shaun-sheep 5 tahun lalu
induk
melakukan
1808c9a77f
100 mengubah file dengan 7796 tambahan dan 6114 penghapusan
  1. 1 1
      .editorconfig
  2. 1 1
      README.md
  3. 0 1
      build/webpack.dev.conf.js
  4. 3 2
      config/dev.env.js
  5. 5 5
      config/index.js
  6. 3 2
      config/prod.env.js
  7. 97 88
      package.json
  8. 39 0
      publish.js
  9. 20 4
      src/api/model/file.js
  10. 29 0
      src/api/model/report.js
  11. 3 2
      src/api/relation/api.js
  12. 21 21
      src/api/scan/fetch.js
  13. 40 40
      src/api/scan/httpUtil.js
  14. 914 719
      src/api/scan/request.js
  15. TEMPAT SAMPAH
      src/assets/image/floorBG.png
  16. 1 1
      src/assets/scss/point/point_config/common.scss
  17. 1 1
      src/assets/scss/point/point_config/reset.scss
  18. 18 6
      src/assets/style/iconfont/iconfont.css
  19. TEMPAT SAMPAH
      src/assets/style/iconfont/iconfont.eot
  20. 9 0
      src/assets/style/iconfont/iconfont.svg
  21. TEMPAT SAMPAH
      src/assets/style/iconfont/iconfont.ttf
  22. TEMPAT SAMPAH
      src/assets/style/iconfont/iconfont.woff
  23. 59 11
      src/components/business_space/business/handsontable.vue
  24. 48 35
      src/components/business_space/dialogs/list/filesDialog.vue
  25. 2 2
      src/components/business_space/dialogs/list/firm.vue
  26. 0 2
      src/components/business_space/dialogs/list/uploadImgDialog.vue
  27. 6 1
      src/components/business_space/lib/detailsDia.vue
  28. 181 162
      src/components/business_space/lib/uploadFiles.vue
  29. 28 26
      src/components/business_space/lib/uploadImgsName.vue
  30. 64 39
      src/components/business_space/newAddDialogs/roomInFloorDialog.vue
  31. 17 17
      src/components/business_space/newGraphy/canvasFun.vue
  32. 4 0
      src/components/business_space/newGraphy/createBSP.vue
  33. 164 36
      src/components/business_space/newGraphy/graphy.vue
  34. 6 3
      src/components/business_space/newTables/eqToSpaceTable.vue
  35. 3 0
      src/components/business_space/newTables/syInSpaceTable.vue
  36. 8 8
      src/components/business_space/table/equipTable.vue
  37. 2 1
      src/components/config_point/dictionaryCascader.vue
  38. 12 6
      src/components/config_point/step3_edit/index.vue
  39. 5 5
      src/components/config_point/step3_point/3_temps.vue
  40. 270 270
      src/components/data_admin/buildTask/detail/deviceDetail.vue
  41. 3 0
      src/components/data_admin/buildTask/dialog/modelTaskDialog.vue
  42. 3 1
      src/components/data_admin/buildTask/table/assetsTable.vue
  43. 3 1
      src/components/data_admin/buildTask/table/deviceTable.vue
  44. 3 1
      src/components/data_admin/buildTask/table/modelTable.vue
  45. 26 46
      src/components/dialogs/changeRea.vue
  46. 591 493
      src/components/dialogs/list/batchDialog.vue
  47. 2 1
      src/components/dialogs/list/filesDialog.vue
  48. 149 143
      src/components/dialogs/list/picDialog.vue
  49. 0 1
      src/components/dialogs/list/uploadImgDialog.vue
  50. 1 1
      src/components/echarts/doughnut.vue
  51. 99 0
      src/components/echarts/fanChart.vue
  52. 118 0
      src/components/echarts/reportDoughnut.vue
  53. 32 6
      src/components/globaluploader/index.vue
  54. 987 939
      src/components/ledger/handsontables/assets.vue
  55. 1068 1010
      src/components/ledger/handsontables/device.vue
  56. 14 10
      src/components/ledger/lib/cascader.vue
  57. 52 60
      src/components/ledger/lib/cenoteGraphy.vue
  58. 12 0
      src/components/ledger/lib/editSysFloor.vue
  59. 9 4
      src/components/ledger/lib/lookImages.vue
  60. 15 11
      src/components/ledger/lib/system.vue
  61. 227 223
      src/components/ledger/lib/uploadFiles.vue
  62. 296 279
      src/components/ledger/lib/uploadImgs.vue
  63. 27 23
      src/components/ledger/lib/uploadImgsName.vue
  64. 336 0
      src/components/ledger/rentList/roomCountDrawer.vue
  65. 82 0
      src/components/ledger/report/datafan.vue
  66. 120 0
      src/components/ledger/report/dataorigin.vue
  67. 2 1
      src/components/model/file/addFolder.vue
  68. 18 10
      src/components/model/file/floorTable.vue
  69. 5 3
      src/components/model/file/modelLog.vue
  70. 130 11
      src/components/model/file/versionDialog.vue
  71. 3 2
      src/components/point/dynamicdata/buildRules.vue
  72. 3 2
      src/components/point/dynamicdata/equipRules.vue
  73. 3 2
      src/components/point/dynamicdata/floorRules.vue
  74. 10 7
      src/components/point/dynamicdata/partsRules.vue
  75. 10 7
      src/components/point/dynamicdata/spaceRules.vue
  76. 6 5
      src/components/point/dynamicdata/systemRules.vue
  77. 10 7
      src/components/point/dynamicdata/tenantRules.vue
  78. 1 1
      src/components/point/report/integrateStatistics.vue
  79. 2 2
      src/components/point/report/pointTabOverview.vue
  80. 48 30
      src/components/point/report/tabFunNumOverview.vue
  81. 0 463
      src/components/relation/overview/CardList.vue
  82. 71 60
      src/components/relation/overview/Modal/RelationMaintain.vue
  83. 28 20
      src/data/menus.js
  84. 4 4
      src/framework/components/messagesever/index.vue
  85. 11 9
      src/framework/components/messagesever/msmq.js
  86. 129 120
      src/framework/layout/layout-store.js
  87. 17 2
      src/router/system.js
  88. 29 29
      src/store/index.js
  89. 2 2
      src/utils/handsontable/buildFloorData.js
  90. 4 3
      src/utils/handsontable/mainText.js
  91. 3 2
      src/utils/handsontable/notShow.js
  92. 426 415
      src/utils/scan/tools.js
  93. 255 0
      src/views/business_space/dataUtil/checkJsonUtil.vue
  94. 83 23
      src/views/business_space/dataUtil/index2.vue
  95. 118 99
      src/views/data_admin/buildAssets/index.vue
  96. 1 1
      src/views/data_admin/buildGraphy/graphyTabs.vue
  97. 3 0
      src/views/data_admin/buildTask/addTask/addDeviceTask.vue
  98. 1 0
      src/views/data_admin/buildTask/addTask/addModelTask.vue
  99. 1 1
      src/views/data_admin/buildTask/index.vue
  100. 0 0
      src/views/ledger/cenotelist/relatedSpace.vue

+ 1 - 1
.editorconfig

@@ -3,7 +3,7 @@ root = true
 [*]
 charset = utf-8
 indent_style = space
-indent_size = 4
+indent_size = 2
 end_of_line = lf
 insert_final_newline = true
 trim_trailing_whitespace = true

+ 1 - 1
README.md

@@ -22,7 +22,7 @@ npm run build --report
 #### 目录结构
 
 ```
-│  .editorconfig                        # 格式化配置,修改缩进为4
+│  .editorconfig                        # 格式化配置,修改缩进为2
 │  index.html                           # 修改页面title
 │  package.json                         # 包
 │  README.md                            # 说明文档

+ 0 - 1
build/webpack.dev.conf.js

@@ -87,7 +87,6 @@ module.exports = new Promise((resolve, reject) => {
                     onErrors: config.dev.notifyOnErrors ? utils.createNotifierCallback() : undefined
                 })
             )
-
             resolve(devWebpackConfig)
         }
     })

+ 3 - 2
config/dev.env.js

@@ -4,8 +4,9 @@ const prodEnv = require('./prod.env')
 
 module.exports = merge(prodEnv, {
     NODE_ENV: '"development"',
-    BASE_URL: '"http://192.168.20.215"', //测试iframe地址
-    SSO_SERVER: '"http://192.168.20.102:8080"', //(新)测试环境
+    BASE_URL: '"http://192.168.20.236"', //测试iframe地址
+    // SSO_SERVER: '"http://192.168.20.102:8080"', //测试环境
+    SSO_SERVER: '"http://192.168.20.236:8086"', //(新)测试环境
     MQTT_SERVICE: '"ws://192.168.20.225:61614/stomp/"' //MQ测试环境地址
     // SSO_SERVER: '"http://sso.sagacloud.cn"',  //正式环境
     // BASE_URL: '"http://mbi.sagacloud.cn"', //线上iframe地址

+ 5 - 5
config/index.js

@@ -11,14 +11,14 @@ module.exports = {
         assetsPublicPath: '/',
         proxyTable: {
             '/admin': {
-                target: 'http://192.168.20.235:8080',
+                target: 'http://192.168.20.236:8080',
                 changeOrigin: true,
                 pathRewrite: {
                     "^/admin": "/"
                 }
             },
             '/api': {
-                target: 'http://192.168.20.235:8080',
+                target: 'http://192.168.20.236:8080',
                 changeOrigin: true,
                 pathRewrite: {
                     "^/api": "/"
@@ -42,7 +42,7 @@ module.exports = {
             },
             '/pointconfig': {
                 // 目标 API 地址
-                target: 'http://192.168.20.235:8080/',
+                target: 'http://192.168.20.236:8080/',
                 // 如果要代理 websockets
                 ws: true,
                 // 将主机标头的原点更改为目标URL
@@ -66,7 +66,7 @@ module.exports = {
             },
             '/ScanBuilding': {
                 // 目标 API 地址
-                target: 'http://192.168.20.235:8080/',
+                target: 'http://192.168.20.236:8080/',
                 // 如果要代理 websockets
                 ws: true,
                 // 将主机标头的原点更改为目标URL
@@ -151,4 +151,4 @@ module.exports = {
         // Set to `true` or `false` to always turn it on or off
         bundleAnalyzerReport: process.env.npm_config_report
     }
-}
+}

+ 3 - 2
config/prod.env.js

@@ -1,8 +1,9 @@
 'use strict'
 module.exports = {
     NODE_ENV: '"production"',
-    BASE_URL: '"http://192.168.20.215"', //测试iframe地址
-    SSO_SERVER: '"http://192.168.20.102:8080"', //(新)测试环境
+    BASE_URL: '"http://192.168.20.236"', //测试iframe地址
+    // SSO_SERVER: '"http://192.168.20.102:8080"', //测试环境
+    SSO_SERVER: '"http://192.168.20.236:8086"', //(新)测试环境
     MQTT_SERVICE: '"ws://192.168.20.225:61614/stomp/"' //MQ测试环境地址
     // BASE_URL: '"http://mbi.sagacloud.cn"', //线上iframe地址
     // SSO_SERVER: '"http://sso.sagacloud.cn"',  //正式环境

+ 97 - 88
package.json

@@ -1,90 +1,99 @@
 {
-    "name": "sagacloud-admin",
-    "version": "1.0.0",
-    "description": "A Vue.js project",
-    "author": "yaoll <yaolinlin@sagacloud.cn>",
-    "private": true,
-    "scripts": {
-        "i": "npm install",
-        "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
-        "start": "npm run dev",
-        "build": "node build/build.js"
-    },
-    "dependencies": {
-        "@sybotan-web/base": "2.1.5",
-        "@sybotan-web/draw": "2.1.56",
-        "@sybotan-web/graphy": "2.1.27",
-        "axios": "^0.18.0",
-        "echarts": "^4.1.0",
-        "element-ui": "^2.11.0",
-        "font-awesome": "^4.7.0",
-        "handsontable-pro": "^3.0.0",
-        "jquery": "^3.3.1",
-        "vue": "^2.5.2",
-        "vue-axios": "^2.1.4",
-        "vue-router": "^3.0.1",
-        "vuex": "^3.1.0",
-        "cad-engine": "2.0.250",
-        "@saga-web/base": "2.1.9",
-        "@saga-web/draw": "2.1.61",
-        "@saga-web/graphy": "2.1.34",
-        "@saga-web/cad-engine": "2.0.420"
-    },
-    "devDependencies": {
-        "ajv": "^6.9.1",
-        "autoprefixer": "^7.1.2",
-        "babel-core": "^6.22.1",
-        "babel-helper-vue-jsx-merge-props": "^2.0.3",
-        "babel-loader": "^7.1.1",
-        "babel-plugin-syntax-jsx": "^6.18.0",
-        "babel-plugin-transform-runtime": "^6.22.0",
-        "babel-plugin-transform-vue-jsx": "^3.5.0",
-        "babel-preset-env": "^1.3.2",
-        "babel-preset-stage-2": "^6.22.0",
-        "chalk": "^2.0.1",
-        "copy-webpack-plugin": "^4.0.1",
-        "css-loader": "^0.28.0",
-        "extract-text-webpack-plugin": "^3.0.0",
-        "file-loader": "^1.1.4",
-        "file-saver": "^2.0.2",
-        "friendly-errors-webpack-plugin": "^1.6.1",
-        "html-webpack-plugin": "^2.30.1",
-        "less": "^3.9.0",
-        "less-loader": "^4.1.0",
-        "node-notifier": "^5.1.2",
-        "node-sass": "^4.11.0",
-        "optimize-css-assets-webpack-plugin": "^3.2.0",
-        "ora": "^1.2.0",
-        "portfinder": "^1.0.13",
-        "postcss-import": "^11.0.0",
-        "postcss-loader": "^2.0.8",
-        "postcss-url": "^7.2.1",
-        "rimraf": "^2.6.0",
-        "sass-loader": "^7.1.0",
-        "semver": "^5.3.0",
-        "shelljs": "^0.7.6",
-        "spark-md5": "^3.0.0",
-        "stompjs": "^2.3.3",
-        "swiper": "^4.0.0",
-        "uglifyjs-webpack-plugin": "^1.1.1",
-        "url-loader": "^0.5.8",
-        "vue-loader": "^13.3.0",
-        "vue-simple-uploader": "^0.7.2",
-        "vue-style-loader": "^3.0.1",
-        "vue-template-compiler": "^2.5.2",
-        "webpack": "^3.6.0",
-        "webpack-bundle-analyzer": "^2.9.0",
-        "webpack-dev-server": "^2.9.1",
-        "webpack-merge": "^4.1.0",
-        "xlsx": "^0.15.1"
-    },
-    "engines": {
-        "node": ">= 6.0.0",
-        "npm": ">= 3.0.0"
-    },
-    "browserslist": [
-        "> 1%",
-        "last 2 versions",
-        "not ie <= 8"
-    ]
+  "name": "sagacloud-admin",
+  "version": "1.0.0",
+  "description": "A Vue.js project",
+  "author": "yaoll <yaolinlin@sagacloud.cn>",
+  "private": true,
+  "remote": {
+    "host": "192.168.20.236",
+    "path": "/opt/nginx/ibms/dist",
+    "user": "root",
+    "password": "saga",
+    "local": "dist"
+  },
+  "scripts": {
+    "i": "npm install",
+    "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
+    "start": "npm run dev",
+    "build": "node build/build.js",
+    "publish": "node publish.js"
+  },
+  "dependencies": {
+    "@sybotan-web/base": "2.1.5",
+    "@sybotan-web/draw": "2.1.56",
+    "@sybotan-web/graphy": "2.1.27",
+    "axios": "^0.18.0",
+    "echarts": "^4.1.0",
+    "element-ui": "^2.11.0",
+    "font-awesome": "^4.7.0",
+    "handsontable-pro": "^3.0.0",
+    "jquery": "^3.3.1",
+    "vue": "^2.5.2",
+    "vue-axios": "^2.1.4",
+    "vue-router": "^3.0.1",
+    "vuex": "^3.1.0",
+    "cad-engine": "2.0.250",
+    "@saga-web/base": "2.1.9",
+    "@saga-web/draw": "2.1.71",
+    "@saga-web/graphy": "2.1.34",
+    "@saga-web/cad-engine": "2.0.494"
+  },
+  "devDependencies": {
+    "ajv": "^6.9.1",
+    "autoprefixer": "^7.1.2",
+    "babel-core": "^6.22.1",
+    "babel-helper-vue-jsx-merge-props": "^2.0.3",
+    "babel-loader": "^7.1.1",
+    "babel-plugin-syntax-jsx": "^6.18.0",
+    "babel-plugin-transform-runtime": "^6.22.0",
+    "babel-plugin-transform-vue-jsx": "^3.5.0",
+    "babel-preset-env": "^1.3.2",
+    "babel-preset-stage-2": "^6.22.0",
+    "chalk": "^2.0.1",
+    "copy-webpack-plugin": "^4.0.1",
+    "css-loader": "^0.28.0",
+    "extract-text-webpack-plugin": "^3.0.0",
+    "file-loader": "^1.1.4",
+    "file-saver": "^2.0.2",
+    "friendly-errors-webpack-plugin": "^1.6.1",
+    "html-webpack-plugin": "^2.30.1",
+    "less": "^3.9.0",
+    "less-loader": "^4.1.0",
+    "node-notifier": "^5.1.2",
+    "node-sass": "^4.11.0",
+    "node-ssh": "^6.0.0",
+    "optimize-css-assets-webpack-plugin": "^3.2.0",
+    "ora": "^1.2.0",
+    "portfinder": "^1.0.13",
+    "postcss-import": "^11.0.0",
+    "postcss-loader": "^2.0.8",
+    "postcss-url": "^7.2.1",
+    "rimraf": "^2.6.0",
+    "sass-loader": "^7.1.0",
+    "semver": "^5.3.0",
+    "shelljs": "^0.7.6",
+    "spark-md5": "^3.0.0",
+    "stompjs": "^2.3.3",
+    "swiper": "^4.0.0",
+    "uglifyjs-webpack-plugin": "^1.1.1",
+    "url-loader": "^0.5.8",
+    "vue-loader": "^13.3.0",
+    "vue-simple-uploader": "^0.7.4",
+    "vue-style-loader": "^3.0.1",
+    "vue-template-compiler": "^2.5.2",
+    "webpack": "^3.6.0",
+    "webpack-bundle-analyzer": "^2.9.0",
+    "webpack-dev-server": "^2.9.1",
+    "webpack-merge": "^4.1.0",
+    "xlsx": "^0.15.1"
+  },
+  "engines": {
+    "node": ">= 6.0.0",
+    "npm": ">= 3.0.0"
+  },
+  "browserslist": [
+    "> 1%",
+    "last 2 versions",
+    "not ie <= 8"
+  ]
 }

+ 39 - 0
publish.js

@@ -0,0 +1,39 @@
+/*
+ * @Author: zhangyu
+ * @Date: 2019-12-18 16:18:30
+ * @Info: 自动化部署
+ * @LastEditTime: 2019-12-18 16:20:55
+ */
+
+const Client = require("node-ssh");
+const ssh = new Client();
+
+ssh.connect({
+  host: process.env.npm_package_remote_host,
+  port: "22",
+  username: process.env.npm_package_remote_user,
+  password: process.env.npm_package_remote_password
+}).then(() => {
+  const failedList = [];
+  ssh.putDirectory(
+    process.env.npm_package_remote_local,
+    process.env.npm_package_remote_path,
+    {
+      recursive: true,
+      concurrency: 1,
+      tick: function(localPath, remotePath, error) {
+        if (error) {
+          failedList.push(localPath);
+        }
+      }
+    }
+  ).then(status => {
+    if (failedList.length > 0) {
+      console.log("发布失败");
+      console.log("failed transfers", failedList.join(", "));
+    } else {
+      console.log(status ? "发布成功" : "发布失败");
+    }
+    ssh.dispose();
+  });
+});

+ 20 - 4
src/api/model/file.js

@@ -61,11 +61,14 @@ let api = {
         if (Name) {
             // 单个查询
             data = {
-                Filters: `Name='${Name}'`
+                Filters: `Name='${Name}'`,
+                Orders: "Name asc"
             }
         } else {
             // 多个查询
-            data = {}
+            data = {
+                Orders: "Name asc"
+            }
         }
         return httputils.postJson(`${baseUrl}/model-folder/query`, data, success)
     },
@@ -210,7 +213,8 @@ let api = {
      */
     deleteModelFileList(params, success) {
         let data = {
-            Id:params
+            Id:params.Id,
+            Force: params.Force?params.Force:false
         } 
         return httputils.postJson(`${baseUrl}/model-file/delete-file`, data, success)
     },
@@ -218,7 +222,7 @@ let api = {
     queryModelFile(FloorModelId, success) {
         let params = {
             Distince: true,
-            Filters: `FloorModelId='${FloorModelId}'`
+            Filters: `FloorModelId='${FloorModelId}';Removed=false`
         }
         return httputils.postJson(`${baseUrl}/model-file/query`, params, success)
     },
@@ -307,4 +311,16 @@ export function bindFloorModel(param, success) {
 export function getFileNameById(param, success) {
     let url = `${baseUrl}/model-folder/get-name`;
     httputils.postJson(url, param, success)
+}
+
+// 根据条件查询统计数量
+export function countSyncLogCount(param, success) {
+    let url = `${baseUrl}/sync-log/count`;
+    httputils.postJson(url, param, success)
+}
+
+// 查询同步日志
+export function querySyncLogCount(param, success) {
+    let url = `${baseUrl}/sync-log/query`;
+    httputils.postJson(url, param, success)
 }

+ 29 - 0
src/api/model/report.js

@@ -0,0 +1,29 @@
+import httputils from '@/api/scan/httpUtil'
+import { Message } from 'element-ui';
+import axios from 'axios'
+const baseUrl = '/modelapi';
+
+// 导出模型问题报告
+// export function exportReport(params, success) {
+//     httputils.postJson(`${baseUrl}/report/non-blocking`, params, success)
+// }
+
+// 查询楼层列表
+export function queryFloorList(params, success) {
+    return httputils.postJson(`${baseUrl}/model-floor/query-list`, params, success)
+}
+
+// 获取项目下所有模型文件夹
+export function queryModel(params, success) {
+    return httputils.postJson(`${baseUrl}/model-folder/query`, params, success)
+}
+
+// 查询文件夹下的所有楼层
+export function queryReportList(params, success) {
+    return httputils.postJson(`${baseUrl}/report/list/non-blocking`, params, success)
+}
+
+// 查询文件夹下的所有楼层(包含缺失楼层)
+export function queryLostReportList(params, success) {
+    return httputils.postJson(`${baseUrl}/model-floor/query-list-missing`, params, success)
+}

+ 3 - 2
src/api/relation/api.js

@@ -75,9 +75,10 @@ export function businessSpaceAll(param) {
   let {relation_type, zone_type, proId} = param
   let userName = storage.get("user_name")
   let ProjectId = localStorage.getItem("projectId")
+  let objectTypes = zone_type ? "?objectTypes=" + zone_type : ''
   return fetch({
     method: 'POST',
-    url: `/api/datacenter/relation-calc/${relation_type}${zone_type ? +'/' + zone_type : ''}`,
+    url: "/api/datacenter/relation-calc/" + relation_type + objectTypes,
     data: proId,
     headers: {'ProjectId': ProjectId, 'Comming': 'adm', 'Account': userName}
   })
@@ -132,4 +133,4 @@ export function createEquip(param, success) {
 export function dictUpdate(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 ditekan karena terlalu besar
+ 914 - 719
src/api/scan/request.js


TEMPAT SAMPAH
src/assets/image/floorBG.png


+ 1 - 1
src/assets/scss/point/point_config/common.scss

@@ -109,7 +109,7 @@ body .htFiltersConditionsMenu:not(.htGhostTable) {
     cursor: pointer;
 }
 
-@media screen and (max-width: 1200px) {
+@media screen and (max-width: 1366px) {
     .w {
         width: 560px;
     }

+ 1 - 1
src/assets/scss/point/point_config/reset.scss

@@ -1,4 +1,4 @@
-$WinWitdh:1200px;
+$WinWitdh:1366px;
 $BaseC:#555;
 $LinkC:#06f;
 $HoverC:#f60;

File diff ditekan karena terlalu besar
+ 18 - 6
src/assets/style/iconfont/iconfont.css


TEMPAT SAMPAH
src/assets/style/iconfont/iconfont.eot


File diff ditekan karena terlalu besar
+ 9 - 0
src/assets/style/iconfont/iconfont.svg


TEMPAT SAMPAH
src/assets/style/iconfont/iconfont.ttf


TEMPAT SAMPAH
src/assets/style/iconfont/iconfont.woff


+ 59 - 11
src/components/business_space/business/handsontable.vue

@@ -10,6 +10,9 @@
       <el-button v-show="!onlyRead" @click="addSp">添加</el-button>
       <el-button @click="reset">刷新</el-button>
       <el-button v-show="!onlyRead" @click="undo">撤销</el-button>
+      <el-input v-model="zoneItemID" placeholder="请输入业务空间id" @keyup.enter.native="getData" style="display:inline-block;width:500px;margin-left:20px;">
+        <i slot="suffix" class="el-input__icon el-icon-search" @click="getData"></i>
+      </el-input>
     </el-row>
     <div v-show="main &&main.length" :id="id"></div>
     <div class="center" v-show="!main || !main.length" style="height: 400px;padding-top:140px;box-sizing:border-box;">
@@ -26,6 +29,8 @@
     </div> -->
     <!-- 二维码弹窗 -->
     <qrcode :dialog="dialog" :qrcodeUrl="qrcodeUrl" :addBody="true" ref="qrcode"></qrcode>
+    <!--      上传图片-->
+    <upload-img-dialog :read="onlyRead" @changeFile="imgChange" :keysArr="imgsArr" :dialog="myDialog" />
   </div>
 </template>
 <script>
@@ -42,6 +47,7 @@ import Handsontable from "handsontable-pro"
 import buildFloor from '@/utils/handsontable/buildFloorData'
 import 'handsontable-pro/dist/handsontable.full.css'
 import zhCN from 'handsontable-pro/languages/zh-CN';
+import uploadImgDialog from "@/components/business_space/dialogs/list/uploadImgDialog"
 import qrcode from "@/components/ledger/lib/qrcode";
 import { queryZone, updateZone, deleteZone, createZone, BeatchQueryParam, updateRelateInSpAndBuild } from "@/api/scan/request";
 import { mapGetters, mapActions } from "vuex";
@@ -53,7 +59,8 @@ export default {
   components: {
     qrcode, //二维码页面
     myPagination,
-    addBusiness
+    addBusiness,
+    uploadImgDialog
   },
   computed: {
     ...mapGetters("layout", ["projectId", "secret", "userId"]),
@@ -98,6 +105,11 @@ export default {
       filtersArr: [], //表格数据被过滤后的下标
       copyMain: [], //深拷贝数组
       buildFloorData: [], //楼层数据
+      zoneItemID: '',
+      myDialog: {
+        uploadImgs: false, //上传图片弹窗
+      },
+      imgsArr: [], //空间图片
     };
   },
   created() {
@@ -115,6 +127,7 @@ export default {
     getHeader(headers, buildFloorSelectd) {
       this.headers = headers
       this.buildFloorSelectd = buildFloorSelectd
+      this.page.pageNumber = 1
       this.getData()
     },
     getData() {
@@ -140,6 +153,9 @@ export default {
           params.data.Filters += `;floorId='${this.buildFloorSelectd[1]}'`
         }
       }
+      if (this.zoneItemID) {
+        params.data.Filters += `;RoomID='${this.zoneItemID}'`
+      }
       if (!params.data.Filters) {
         delete params.data.Filters
       }
@@ -206,7 +222,7 @@ export default {
           "filter_by_value",
           "filter_action_bar"
         ],
-        contextMenu: this.onlyRead ? false :{
+        contextMenu: this.onlyRead ? false : {
           items: {
             remove_row: {
               name: "删除该业务空间"
@@ -252,7 +268,8 @@ export default {
     },
     getInfors(infos, row) {
       let val = this.hot.colToProp(row.col);
-      lStorage.set('screen_data', {path: this.$route.path, data: {RoomID: infos.RoomID, zone: this.zoneCode}})
+      this.row = row.row;
+      lStorage.set('screen_data', { path: this.$route.path, data: { RoomID: infos.RoomID, zone: this.zoneCode } })
       if (val == "point") {
         let query = {
           RoomID: infos.RoomID,
@@ -271,6 +288,12 @@ export default {
         } else {
           this.$message("此设备没有设备二维码")
         }
+      } else if (val == "Pic") {
+        let Picdata = tools.dataForKey(this.main[row.row], val);
+        this.imgsArr = Picdata ? Picdata : [];
+        if (!this.onlyRead || this.imgsArr.length) {
+          this.myDialog.uploadImgs = true;
+        }
       } else {
         return false;
       }
@@ -345,13 +368,19 @@ export default {
         this.$message("新添加业务空间内容不能为空!")
         return
       }
-      if (this.buildFloorSelectd && this.buildFloorSelectd[0] && this.buildFloorSelectd[1]) {
-        param.BuildingId = this.buildFloorSelectd[0]
-        param.FloorId = this.buildFloorSelectd[1]
+      if (param.flowBuild) {
+        param.BuildingId = param.flowBuild.split('-')[0]
+        param.FloorId = param.flowBuild.split('-')[1] || null
+      } else {
+        if (this.buildFloorSelectd) {
+          if (this.buildFloorSelectd[0] != 'all' && this.buildFloorSelectd[0] != 'noKnow') {
+            param.BuildingId = this.buildFloorSelectd[0]
+          }
+          if (this.buildFloorSelectd[1] && this.buildFloorSelectd[1] != 'all' && this.buildFloorSelectd[1] != 'noKnow') {
+            param.FloorId = this.buildFloorSelectd[1]
+          }
+        }
       }
-      //  else if (this.buildMess.selectd && this.buildMess.selectd[0] && !this.buildMess.selectd[1]) {
-      //   param.BuildingId = this.buildMess.selectd[0]
-      // }
       let params = {
         zone: this.zoneCode,
         data: {
@@ -425,7 +454,6 @@ export default {
           this.$message.success('修改成功')
         })
       } else {
-        param.data.Projection = []
         updateZone(param, (res) => { })
       }
     },
@@ -612,13 +640,33 @@ export default {
     //切换每页显示多少条数据
     handleSizeChange(val) {
       this.page.pageSize = val
+      this.page.pageNumber = 1
       this.getData()
     },
     //切换页数
     handleCurrentChange(val) {
       this.page.pageNumber = val
       this.getData()
-    }
+    },
+    //上传图片弹窗触发事件
+    imgChange(keys) {
+      this.setDataToMain(keys, 'Pic', this.row);
+    },
+    //判断是否有值,有值赋值
+    setDataToMain(data, key, row) {
+      if (!!data && data != '--') {
+        if (!!this.main[row]) {
+          tools.setDataForKey(this.main[row], key, data);
+          this.tdChange([[row, key, null, data]], "edit");
+        } else {
+          this.main[row] = {};
+          tools.setDataForKey(this.main[row], key, data);
+        }
+      } else {
+        tools.setDataForKey(this.main[row], key, "");
+      }
+      this.hot.render()
+    },
   },
   watch: {
     projectId() {

+ 48 - 35
src/components/business_space/dialogs/list/filesDialog.vue

@@ -3,50 +3,63 @@
 -->
 
 <template>
-  <el-dialog title="上传文件" :visible.sync="dialog.uploadFiles" width="500px">
+  <el-dialog
+      title="上传文件"
+      :visible.sync="dialog.uploadFiles"
+      width="500px"
+  >
     <div class='max-height: 500px; overflow-y: auto;'>
-        <upload-files :readOnly="read" :keysArr="keysArr" @change="changeItem" max="2"></upload-files>
+      <upload-files
+          :readOnly="read"
+          :keysArr="keysArr"
+          :show-file-list="false"
+          @change="changeItem"
+          max="2"
+      />
     </div>
   </el-dialog>
 </template>
 <script>
-import uploadFiles from "@/components/business_space/lib/uploadFiles";
-export default {
-  components: {
-    uploadFiles
-  },
-  props: {
-    dialog: {
-      type: Object,
-      default: function () {
-        return {
-          uploadFiles: false
-        };
+  import uploadFiles from "@/components/business_space/lib/uploadFiles";
+
+  export default {
+    components: {
+      uploadFiles
+    },
+    props: {
+      dialog: {
+        type: Object,
+        default: function () {
+          return {
+            uploadFiles: false
+          };
+        }
+      },
+      keysArr: {
+        type: Array,
+        default: function () {
+          return []
+        }
+      },
+      read: {
+        type: Boolean,
+        default: false
       }
     },
-    keysArr: {
-      type: Array,
-      default: function () {
-        return []
+    data() {
+      return {};
+    },
+    created() {
+    },
+    mounted() {
+    },
+    methods: {
+      changeItem(file) {
+        console.log(file)
+        this.$emit("changeFile", file)
       }
     },
-    read: {
-      type: Boolean,
-      default: false
-    }
-  },
-  data() {
-    return {};
-  },
-  created() { },
-  mounted() { },
-  methods: {
-    changeItem(file) {
-      console.log(file)
-      this.$emit("changeFile", file)
-    }
-  },
-};
+  };
 </script>
 <style>
 </style>

+ 2 - 2
src/components/business_space/dialogs/list/firm.vue

@@ -2,7 +2,7 @@
     firm 厂商
 -->
 <template>
-  <el-dialog title="选择型号" :visible.sync="dialog.firm" width="900px">
+  <el-dialog title="选择生产厂家/品牌/型号" :visible.sync="dialog.firm" width="900px">
     <div>
       <div id="firm">
         <div class="title-search query-form" style="padding: 10px;margin-bottom: 10px;">
@@ -60,7 +60,7 @@ import myPagination from "@/components/common/myPagination";
 import paramDetails from "@/components/business_space/dialogs/list/paramDetails"
 import { getSpecList, getBrandList, getManufacturerList } from "@/api/scan/request"
 
-    export default {
+export default {
   components: {
     myPagination,
     paramDetails

+ 0 - 2
src/components/business_space/dialogs/list/uploadImgDialog.vue

@@ -43,11 +43,9 @@ export default {
   mounted() { },
   methods: {
     deepcopy(obj) {
-      console.log(obj, "out")
       return JSON.parse(JSON.stringify(obj));
     },
     changeItem(file) {
-      console.log(file, "changed")
       this.$emit("changeFile", file)
     }
   },

+ 6 - 1
src/components/business_space/lib/detailsDia.vue

@@ -41,7 +41,12 @@ export default {
       this.$nextTick(_ => {
         let iframe = document.getElementById(this.id)
         iframe.onload = () => {
-          iframe.contentWindow.postMessage(this.setData, "*")
+          let arr = this.setData.map(i => ({
+            key: i.Key,
+            name: i.Name,
+            type: i.Type
+          }))
+          iframe.contentWindow.postMessage(arr, "*")
         }
       })
     }

+ 181 - 162
src/components/business_space/lib/uploadFiles.vue

@@ -10,25 +10,38 @@
 <template>
   <div id="saga-upload">
     <div id="uploadFile">
-
       <el-upload
-        v-if="filesArr.length < max"
-        class="upload-file"
-        action
-        :http-request="uploadAndSubmit"
-        :show-file-list="false"
-        drag
+          class="upload-file"
+          action
+          :http-request="uploadAndSubmit"
+          :show-file-list="false"
+          drag
       >
-        <el-button size="small" type="primary" v-if="!readOnly">点击上传</el-button>
-        <div slot="tip" class="el-upload__tip" v-if="!readOnly">请上传文件</div>
+        <el-button
+            size="small"
+            type="primary"
+            v-if="!readOnly"
+        >点击上传</el-button>
+        <div
+            slot="tip"
+            class="el-upload__tip"
+            v-if="!readOnly"
+        >请上传文件</div>
       </el-upload>
-            <div v-if="item && filesArr.length" v-for="(item,index) in filesArr">
-        <el-button type="text" @click="download(item)">{{delFile(item)}}</el-button>
+      <div
+          v-if="item && filesArr.length"
+          v-for="(item,index) in filesArr"
+      >
+        <el-button
+            type="text"
+            @click="download(item.Key)"
+        >
+          {{delFile(item.Name)}}</el-button>
         <i
-          v-if="!readOnly"
-          class="el-icon-close delete-icon"
-          style="margin-left:10px; cursor:pointer"
-          @click="deleteFile(index,item)"
+            v-if="!readOnly"
+            class="el-icon-close delete-icon"
+            style="margin-left:10px; cursor:pointer"
+            @click="deleteFile(index,item)"
         ></i>
       </div>
     </div>
@@ -36,173 +49,179 @@
 </template>
 
 <script>
-import tools from "@/utils/scan/tools";
-export default {
-  props: {
-    keysArr: {
-      type: [Array, String],
-      default: function () {
-        return []
-      }
-    },
-    readOnly: {
-      type: Boolean,
-      default: false
-    },
-    max: {
-      type: [Number, String],
-      default: 6
-    },
-    defined: null
-  },
-  data() {
-    return {
-      filesArr: []
-    };
-  },
-  created() {
-    let type = typeof (this.keysArr)
-    this.fileFalg()
-  },
-  methods: {
-    //判断是否为空
-    fileFalg() {
-      let type = typeof (this.keysArr)
-      console.log(this.keysArr, "keysAee")
-      if (type == 'string') {
-        this.filesArr = [this.keysArr]
-      } else {
-        this.filesArr = tools.deepCopy(this.keysArr)
-      }
+  import tools from "@/utils/scan/tools";
 
-      if (!this.keysArr) {
-        this.filesArr = []
-      }
+  export default {
+    props: {
+      keysArr: {
+        type: [Array, String],
+        default: function () {
+          return []
+        }
+      },
+      readOnly: {
+        type: Boolean,
+        default: false
+      },
+      max: {
+        type: [Number, String],
+        default: 6
+      },
+      defined: null
     },
-    //处理地址
-    delFile(name) {
-      console.log(name, "name")
-      return name.length > 20 ? name.substring(0, 20) + "..." : ""
+    data() {
+      return {
+        filesArr: []
+      };
     },
-
-    resetFile() {
-      this.filesArr = []
+    created() {
+      this.fileFalg()
     },
+    methods: {
+      //判断是否为空
+      fileFalg() {
+        let type = typeof (this.keysArr)
+        if (type == 'string') {
+          this.filesArr = [this.keysArr]
+        } else {
+          this.filesArr = tools.deepCopy(this.keysArr)
+        }
 
+        if (!this.keysArr) {
+          this.filesArr = []
+        }
+      },
+      //处理地址
+      delFile(name) {
+        return name.length > 20 ? name.substring(0, 20) + "..." : name
+      },
 
-    //点击下载
-    download(key) {
-      console.log(key)
-      window.open("/image-service/common/file_get/" + key + "?systemId=dataPlatform")
-    },
+      resetFile() {
+        this.filesArr = []
+      },
 
-    //删除图片
-    deleteFile(i, key) {
-      this.filesArr.splice(i, 1);
-      this.$emit("change", this.filesArr, this.defined);
-    },
 
-    //上传
-    uploadAndSubmit(item) {
-      // var form = document.forms["demoForm"];
+      //点击下载
+      download(key) {
+        console.log(key)
+        window.open("/image-service/common/file_get/" + key + "?systemId=dataPlatform")
+      },
 
-      // if (form["file"].files.length > 0) {
-      // 寻找表单域中的 <input type="file" ... /> 标签
-      // var file = form["file"].files[0];
+      //删除图片
+      deleteFile(i, key) {
+        this.filesArr.splice(i, 1);
+        this.$emit("change", this.filesArr, this.defined);
+      },
 
-      let file = item.file;
-      // try sending
-      let reader = new FileReader();
+      //上传
+      uploadAndSubmit(item) {
+        // var form = document.forms["demoForm"];
 
-      let vm = this;
+        // if (form["file"].files.length > 0) {
+        // 寻找表单域中的 <input type="file" ... /> 标签
+        // var file = form["file"].files[0];
 
-      let fileType = file.name.split(".");
-      let type = fileType[fileType.length - 1];
-      let key = "&key=" + fileType[0] + file.uid + "." + type
+        let file = item.file;
+        // try sending
+        let reader = new FileReader();
 
-      reader.onloadstart = function () {
-        // 这个事件在读取开始时触发
-      };
-      reader.onprogress = function (p) {
-        // 这个事件在读取进行中定时触发
-      };
+        let vm = this;
 
-      reader.onload = function () {
-        // 这个事件在读取成功结束后触发
-      };
-      reader.onloadend = function () {
-        // 这个事件在读取结束后,无论成功或者失败都会触发
-        if (reader.error) {
-        } else {
-          // document.getElementById("bytesRead").textContent = file.size;
-          // 构造 XMLHttpRequest 对象,发送文件 Binary 数据
-          var xhr = new XMLHttpRequest();
-          xhr.open(
-            /* method */
-            "POST",
-            /* target url */
-            "/image-service/common/file_upload?systemId=dataPlatform&secret=9e0891a7a8c8e885&overwrite=true" + key
-            /*, async, default to true */
-          );
-          //xhr.overrideMimeType("application/octet-stream");
-          xhr.send(reader.result);
-          xhr.onreadystatechange = function () {
-            if (xhr.readyState == 4) {
-              console.log(xhr)
-              if (xhr.status == 200) {
-                vm.filesArr.push(
-                  key.split("=")[1]
-                );
-                console.log(vm.filesArr)
-                vm.$emit("change", vm.filesArr, vm.defined);
-              } else {
-                this.$message.error(res.data.ResultMsg)
+        let fileType = file.name.split(".");
+        let type = fileType[fileType.length - 1];
+        let key = "&key=" + fileType[0] + file.uid + "." + type
+        let CreateTime = tools.formatDate(new Date(file.lastModified))
+        reader.onloadstart = function () {
+          // 这个事件在读取开始时触发
+        };
+        reader.onprogress = function (p) {
+          // 这个事件在读取进行中定时触发
+        };
+
+        reader.onload = function () {
+          // 这个事件在读取成功结束后触发
+        };
+        reader.onloadend = function () {
+          // 这个事件在读取结束后,无论成功或者失败都会触发
+          if (reader.error) {
+          } else {
+            // document.getElementById("bytesRead").textContent = file.size;
+            // 构造 XMLHttpRequest 对象,发送文件 Binary 数据
+            var xhr = new XMLHttpRequest();
+            xhr.open(
+              /* method */
+              "POST",
+              /* target url */
+              "/image-service/common/file_upload?systemId=dataPlatform&secret=9e0891a7a8c8e885&overwrite=true" + key
+              /*, async, default to true */
+            );
+            //xhr.overrideMimeType("application/octet-stream");
+            xhr.send(reader.result);
+            xhr.onreadystatechange = function () {
+              if (xhr.readyState == 4) {
+                console.log(xhr)
+                if (xhr.status == 200) {
+                  let fileObject = {
+                    Key: key.split("=")[1],
+                    Type: type,
+                    Name: file.name,
+                    CreateTime,
+                    SystemId: 'dataPlatform'
+                  }
+                  vm.filesArr.push(fileObject);
+                  vm.$emit("change", vm.filesArr, vm.defined);
+                } else {
+                  this.$message.error(res.data.ResultMsg)
+                }
               }
-            }
-          };
-        }
-      };
-      reader.readAsArrayBuffer(file);
-    }
-  },
-  watch: {
-    keysArr: function (val) {
-      this.fileFalg()
+            };
+          }
+        };
+        reader.readAsArrayBuffer(file);
+      }
+    },
+    watch: {
+      keysArr: function (val) {
+        this.fileFalg()
+      }
     }
-  }
-};
+  };
 </script>
 
 <style lang="less">
-#saga-upload {
-  .dill-image {
-    position: absolute;
-    right: 0px;
-    top: 0px;
-    font-size: 20px;
-  }
-  .el-upload-dragger {
-    width: 180px;
-    height: 180px;
-  }
-  img {
-    position: absolute;
-    top: 0;
-    bottom: 0;
-    left: 0;
-    right: 0;
-    width: 100%;
-    height: 100%;
-  }
-  #uploadFile {
-    .upload-file {
-      overflow: hidden;
-      .el-upload-dragger {
-        width: inherit;
-        height: inherit;
-        border: none;
+  #saga-upload {
+    .dill-image {
+      position: absolute;
+      right: 0;
+      top: 0;
+      font-size: 20px;
+    }
+
+    .el-upload-dragger {
+      width: 180px;
+      height: 180px;
+    }
+
+    img {
+      position: absolute;
+      top: 0;
+      bottom: 0;
+      left: 0;
+      right: 0;
+      width: 100%;
+      height: 100%;
+    }
+
+    #uploadFile {
+      .upload-file {
+        overflow: hidden;
+
+        .el-upload-dragger {
+          width: inherit;
+          height: inherit;
+          border: none;
+        }
       }
     }
   }
-}
 </style>

+ 28 - 26
src/components/business_space/lib/uploadImgsName.vue

@@ -10,9 +10,10 @@
       <div v-if="type != 'video'" class="point-view" v-for="(item,index) in imagesArr">
         <div class="point-image">
           <i v-if="!readOnly" class="el-icon-delete" @click="delImage(index,item)"></i>
-          <img @click="lookImg" :src="imageGetUrl + '&key=' +item.key" alt v-load>
+          <img @click="lookImg" :src="imageGetUrl + '&key=' +item.Key" alt v-load>
         </div>
-        <form-input :label="''" @change="getName" :keys="index" :value="item.name" :width="10"></form-input>
+        <p v-if="readOnly" >{{item.Name}}</p>
+        <form-input v-else :label="''" @change="getName" :keys="index" :value="item.Name" :width="10"></form-input>
       </div>
       <div v-if="type == 'video'" class="point-view" v-for="(item,index) in imagesArr">
         <div class="point-image">
@@ -20,13 +21,14 @@
           <video
             width="100%"
             height="100%;"
-            :src="imageGetUrl + '&key=' +item.key"
+            :src="imageGetUrl + '&key=' +item.Key"
             controls="controls"
           >您的浏览器不支持 video 标签。</video>
         </div>
-        <form-input :label="''" @change="getName" :keys="index" :value="item.name" :width="10"></form-input>
+        <p v-if="readOnly" >{{item.Name}}</p>
+        <form-input v-else :label="''" @change="getName" :keys="index" :value="item.Name" :width="10"></form-input>
       </div>
-      <div v-if="!readOnly && imagesArr.length < max" style="float:left;">
+      <div v-if="!readOnly" style="float:left;">
         <el-upload
           class="avatar-uploader"
           :http-request="uploadAndSubmit"
@@ -34,7 +36,7 @@
           :accept="accept"
           action
           drag
-          style="position: relation"
+          style="position: relative"
         >
           <i class="el-icon-plus avatar-uploader-icon"></i>
         </el-upload>
@@ -99,8 +101,7 @@ export default {
   },
   methods: {
     getName(name, index) {
-      console.log(this.imagesArr, "imagesArr")
-      this.imagesArr[index].name = name
+      this.imagesArr[index].Name = name
       this.$emit("change", this.imagesArr, this.defined, this.videoPicArr);
     },
     //判断是否为空
@@ -155,6 +156,7 @@ export default {
 
       let fileType = file.name.split(".");
       let type = fileType[fileType.length - 1];
+      let CreateTime = tools.formatDate(new Date(file.lastModified))
 
       let uploadKey = file.uid
       if (!!key) {
@@ -191,31 +193,31 @@ export default {
             if (xhr.readyState == 4) {
               if (xhr.status == 200) {
                 if (vm.type == 'image') {
-                  vm.imagesArr.push(
-                    {
-                      name: uploadKey + '',
-                      key: uploadKey + "." + type,
-                      systemId: "dataPlatform",
-                      type: "image"
-                    }
-                  );
+                  vm.imagesArr.push({
+                      Name: uploadKey + '',
+                      Key: uploadKey + "." + type,
+                      SystemId: "dataPlatform",
+                      Type: "image",
+                      CreateTime
+                    });
                 }
                 if (type == 'mp4') {
                   vm.imagesArr.push({
-                    name: uploadKey + '',
-                    key: uploadKey + "." + type,
-                    systemId: "dataPlatform",
-                    type: "video"
-                  }
-                  );
+                      Name: uploadKey + '',
+                      Key: uploadKey + "." + type,
+                      SystemId: "dataPlatform",
+                      Type: "video",
+                      CreateTime
+                  });
                   vm.creatImg(vm.imageGetUrl + "&key=" + uploadKey + "." + type, uploadKey)
                 }
                 if (vm.type == "video" && type == "png") {
                   vm.videoPicArr.push({
-                    name: uploadKey + '',
-                    key: uploadKey + "." + type,
-                    systemId: "dataPlatform",
-                    type: "image_video"
+                    Name: uploadKey + '',
+                    Key: uploadKey + "." + type,
+                    SystemId: "dataPlatform",
+                    Type: "image_video",
+                    CreateTime
                   })
                 }
                 vm.$emit("change", vm.imagesArr, vm.defined, vm.videoPicArr);

+ 64 - 39
src/components/business_space/newAddDialogs/roomInFloorDialog.vue

@@ -1,19 +1,39 @@
 <template>
   <el-dialog :title="title" :visible.sync="dialogVisible" width="800px" id="addSyDialog">
     <div class="table-box">
-      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="headerStyle" ref="multipleTable">
+      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="headerStyle" ref="multipleTable" border>
         <el-table-column label="业务空间名称" show-overflow-tooltip min-width="100">
           <template slot-scope="scope">
             <div>
-              {{scope.row.SysLocalName||scope.row.SysName||''}}
+              {{scope.row.RoomLocalName||scope.row.RoomName||''}}
             </div>
           </template>
         </el-table-column>
-        <el-table-column prop="SysLocalID" label="所属建筑" show-overflow-tooltip min-width="100"></el-table-column>
-        <el-table-column prop="SysLocalID" label="所属楼层" show-overflow-tooltip min-width="100"></el-table-column>
-        <el-table-column prop="action" label="操作" min-width="100">
+        <el-table-column label="所属建筑" show-overflow-tooltip min-width="100" class-name="mutiCol">
           <template slot-scope="scope">
-            <el-button size="mini" @click="toDetail(scope.$index, scope.row)" type="primary" plain>查看详情</el-button>
+            <div>
+              <div v-for="(t,i) in scope.row.FloorList" :key="i" class="muti">
+                {{t.Building.BuildLocalName||t.Building.BuildName}}
+              </div>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="SysLocalID" label="所属楼层" show-overflow-tooltip min-width="100" class-name="mutiCol">
+          <template slot-scope="scope">
+            <div>
+              <div v-for="t in scope.row.FloorList" :key="t.FloorID" class="muti">
+                {{t.FloorLocalName||t.FloorName}}
+              </div>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="action" label="操作" min-width="50" align='center' class-name="mutiCol">
+          <template slot-scope="scope">
+            <div>
+              <div v-for="t in scope.row.FloorList" :key="t.FloorID" class="muti">
+                <el-radio v-model="scope.row.selected" :label="t">{{''}}</el-radio>
+              </div>
+            </div>
           </template>
         </el-table-column>
       </el-table>
@@ -24,12 +44,10 @@
     </span>
   </el-dialog>
 </template>
-
-
 <script>
 import {
-  notSyInSpaceQuery, //没有和当前空间绑定的系统
-  syInSpaceCreate, //系统所在业务空间--创建关系
+  getSpaceBdFlData, // 属于多建筑楼层的空间数据
+  updateRelateInSpAndBuild, //保存业务空间与建筑楼层关系
 } from "@/api/scan/request";
 export default {
   data() {
@@ -59,45 +77,39 @@ export default {
       this.tableData = [];
       this.getTableData();
     },
-    // 选中项修改
-    handleSelectionChange(val) {
-      this.selections = val;
-    },
     // 确认
     savaRelation() {
-      let pa = {
-        data: {
-          SpaceId: this.spaceId,
-          SysIdList: []
-        },
-        type: this.zone
-      }
-      this.selections.map(t => {
-        pa.data.SysIdList.push(t.SysID)
-      })
-      syInSpaceCreate(pa, res => {
-        this.$message.success('关联成功');
-        this.$emit('refresh');
-        this.dialogVisible = false;
+      let arr = [];
+      this.tableData.forEach(t => {
+        if (t.selected) {
+          arr.push({
+            spaceId: t.RoomID,
+            id: t.selected.FloorID,
+            type: t.ObjectType
+          })
+        }
       })
+      if (arr.length) {
+        updateRelateInSpAndBuild(arr, res => {
+          this.$emit('relaSuc');
+          this.$message.success('关联成功');
+          this.dialogVisible = false;
+        })
+      } else {
+        this.$message.warning('请选择关联建筑楼层');
+      }
     },
     // 获取表格数据
     getTableData() {
       let pa = {
-        data: {
-          PageSize: 200,
-          Orders: 'SysID asc'
-        },
-        type: this.zone,
-        spaceId: this.spaceId
+        Cascade: [
+          { Name: "floorlList", Cascade: [{ Name: 'building' }] }
+        ],
+        PageSize: 1000
       }
-      notSyInSpaceQuery(pa, res => {
+      getSpaceBdFlData(pa, res => {
         this.tableData = res.Content;
       })
-    },
-    // 查看详情
-    toDetail() {
-      this.$message('开发中')
     }
   }
 }
@@ -106,6 +118,19 @@ export default {
 #addSyDialog {
   .table-box {
     height: 350px;
+    /deep/ .mutiCol {
+      padding: 0;
+      & > div {
+        padding: 0;
+      }
+    }
+    .muti {
+      line-height: 32px;
+      padding: 0 10px;
+      & + .muti {
+        border-top: 1px solid #ebeef5;
+      }
+    }
   }
 }
 </style>

+ 17 - 17
src/components/business_space/newGraphy/canvasFun.vue

@@ -3,11 +3,11 @@
     <!-- <div :class="{'active':active=='move'}">
       <i class="iconfont icon-move" @click="moveCanvas"></i>
     </div> -->
-    <div v-if="config.isEdit&&config.groupSelect" :class="{'active':active=='groupSelect'}">
-      <i class="iconfont icon-shuxingxuanze" @click="groupSelect"></i>
+    <div v-if="config.isEdit&&config.groupSelect" :class="{'active':active=='groupSelect'}" @click="groupSelect">
+      <i class="iconfont icon-shuxingxuanze"></i>
     </div>
-    <div>
-      <i class="iconfont icon-maximize" @click="fitToWindow"></i>
+    <div @click="fitToWindow">
+      <i class="iconfont icon-maximize"></i>
     </div>
     <div v-if="!config.isEdit">
       <el-dropdown size="mini" placement="top-start" @command="handleCommand">
@@ -19,33 +19,33 @@
         </el-dropdown-menu>
       </el-dropdown>
     </div>
-    <div v-if="config.isEdit&&config.divide" :class="{'active':active=='divide'}">
+    <div v-if="config.isEdit&&config.divide" :class="{'active':active=='divide'}" @click="divide">
       <el-dropdown size="mini" placement="top-start" @command="handleDivideCommand" :hide-on-click="false">
-        <i class="iconfont icon-edit1" @click="divide"></i>
+        <i class="iconfont icon-edit1"></i>
         <el-dropdown-menu slot='dropdown'>
           <el-dropdown-item command="savePng">
-            吸附<el-switch v-model="isSwitch"></el-switch>
+            吸附 <el-switch v-model="isSwitch"></el-switch>
           </el-dropdown-item>
         </el-dropdown-menu>
       </el-dropdown>
     </div>
-    <div v-if="config.isEdit&&config.divide">
-      <i class="iconfont icon-Erase" @click="clearDivide"></i>
+    <div v-if="config.isEdit&&config.divide" @click="clearDivide">
+      <i class="iconfont icon-Erase"></i>
     </div>
-    <div v-if="config.isEdit">
-      <i class="iconfont icon-Cancel" @click="undo"></i>
+    <div v-if="config.isEdit" @click="undo">
+      <i class="iconfont icon-Cancel"></i>
     </div>
-    <div v-if="config.isEdit">
-      <i class="iconfont icon-Anti-cancel" @click="redo"></i>
+    <div v-if="config.isEdit" @click="redo">
+      <i class="iconfont icon-Anti-cancel"></i>
     </div>
-    <div>
-      <i class="iconfont icon-narrow" @click="reduce"></i>
+    <div @click="reduce">
+      <i class="iconfont icon-narrow"></i>
     </div>
     <div class="line">
       <el-slider tooltip-class="tooltip-class" :min="min" v-model="sliderVal" :show-tooltip="false" @input="scale" :max="max"></el-slider>
     </div>
-    <div>
-      <i class="iconfont icon-zoom" @click="plus"></i>
+    <div @click="plus">
+      <i class="iconfont icon-zoom"></i>
     </div>
   </el-row>
 </template>

+ 4 - 0
src/components/business_space/newGraphy/createBSP.vue

@@ -26,6 +26,10 @@ export default {
     },
     // 确认
     confirm() {
+      if (this.roomName == '') {
+        this.$message.warning("请填写空间名称");
+        return
+      }
       this.$emit('createRoom', this.roomName);
       this.dialogVisible = false;
     }

+ 164 - 36
src/components/business_space/newGraphy/graphy.vue

@@ -15,9 +15,10 @@
             width="180px" @select="handleSelect">
             <i class="el-icon-search el-input__icon" slot="suffix" @click="handleSelect"></i>
             <template slot-scope="{ item }">
-              <div class="name" style="position: relative;">
-                {{ item.data.RoomLocalName | cutString(8) }}
-                <span class="addr" style="position: absolute;right:10px;color:#409EFF;">定位</span>
+              <div class="name" style="position: relative;padding-right:40px;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;"
+                :title="item.data.RoomLocalName">
+                {{ item.data.RoomLocalName }}
+                <span class="addr" style="position: absolute;right:0;color:#409EFF;">定位</span>
               </div>
             </template>
           </el-autocomplete>
@@ -108,7 +109,6 @@ import {
   groupCreRelaZoneAndISp
 } from "@/api/scan/request"
 
-//  BSP => 业务空间
 export default {
   components: {
     canvasFun,
@@ -141,18 +141,20 @@ export default {
       isAction: false,
       curOutline: [],
       BIMIDToSID: {}, //bimid映射元空间id
+      BIMIDToSIName: {}, //bimid映射元空间名称
       curZoneItem: {}, //当前选中的业务空间item
       allUnRelatISP: [], //
       zoneList: [], // 业务空间-canvas图中
       groupCreateDialogVis: false, //批量创建业务空间弹窗
       groupCreateType: 1, //批量创建方式
       zoneDisable: true, // 重新划分是否禁用
+      sourceIdToISP: {}
     }
   },
   computed: {
     ...mapGetters('layout', ['projectId'])
   },
-  created() {},
+  created() { },
   mounted() {
     this.canvasWidth = this.$refs.graphy.offsetWidth;
     this.canvasHeight = this.$refs.graphy.offsetHeight;
@@ -203,8 +205,13 @@ export default {
       }
       queryZone(pa, res => {
         this.BIMIDToSID = {}
+        this.BIMIDToSIName = {}
+        this.sourceIdToISP = {}
         res.Content.map(t => {
-          this.BIMIDToSID[t.BIMID.split(":")[1]] = t.RoomID;
+          let key = t.BIMID.split(":")[1];
+          this.BIMIDToSID[key] = t.RoomID;
+          this.BIMIDToSIName[key] = t.RoomLocalName || t.RoomName;
+          this.sourceIdToISP[key] = t;
         })
       })
     },
@@ -361,6 +368,7 @@ export default {
           this.curZoneItem = item;
           this.scene.clearZoneSelection();
           item.selected = true;
+          this.$emit('copyID', this.curZoneItem.data.RoomID)
         }
       }
     },
@@ -387,6 +395,7 @@ export default {
     // 取消(所有取消公用)
     cancelGraphy() {
       this.init(2);
+      this.$emit('copyID', '')
     },
     // 批量创建业务空间弹窗
     handleCommand(command) {
@@ -461,7 +470,7 @@ export default {
       if (arr.length) {
         let tempArr = [];
         arr.map(t => {
-          tempArr.push(t.data.Name);
+          tempArr.push(this.BIMIDToSIName[t.data.SourceId]);
         })
         this.$refs.createBSP.showDialog(tempArr.toString());
       } else {
@@ -470,15 +479,45 @@ export default {
     },
     // 根据图创建新的业务空间-弹窗返回确认创建
     createRoom(val) {
+      // const zoneObj = { Outline: [], Height: 0 }, IspaceIdList = [];
+      // let spaces = {};
+      // if (this.scene.cutItem || this.scene.sceneMark) {
+      //   // 如果有划分,求交集
+      //   // 格式为Poly(先与业务空间求差集)
+      //   const obj = this.scene.getZoneDifference(true);
+      //   // 差集与楼层平面图或用户划分区域求交集
+      //   spaces = this.scene.getPloyIntersect(obj)
+      // } else {
+      //   // 格式为SPoint[]
+      //   spaces = this.scene.getZoneDifference();
+      // }
+      // for (let key in spaces) {
+      //   spaces[key].map(t => {
+      //     let temp = t.map(item => {
+      //       return {
+      //         X: 1*item.x.toFixed(2),
+      //         Y: -item.y.toFixed(2),
+      //         Z: 0
+      //       }
+      //     })
+      //     zoneObj.Outline.push([temp]);
+      //   })
+      //   let curISP = this.sourceIdToISP[key];
+      // if (curISP) {
+      //   curISP && IspaceIdList.push(curISP.RoomID);
+      //   zoneObj.Height = zoneObj.Height == 0 ? curISP.Height : zoneObj.Height > curISP.Height ? curISP.Height : zoneObj.Height;
+      // }
+      // }
+      // 数据计算导致浏览器奔溃,临时注释
       let zoneObj = { Outline: [], Height: 0 }, IspaceIdList = [];
       let selectSpaces = this.scene.getSelectedSpaces();
       selectSpaces.map(t => {
         zoneObj.Outline.push(t.data.OutLine);
-        if (this.BIMIDToSID[t.data.SourceId]) {
-          IspaceIdList.push(this.BIMIDToSID[t.data.SourceId]);
-        }
-        if (t.data.Height && (zoneObj.Height == 0 || t.data.Height < zoneObj.Height)) {
-          zoneObj.Height = t.data.Height > 100 ? (t.data.Height / 1000).toFixed(2) : t.data.Height;
+        let key = t.data.SourceId;
+        let curISP = this.sourceIdToISP[key];
+        if (curISP) {
+          IspaceIdList.push(curISP.RoomID);
+          zoneObj.Height = zoneObj.Height == 0 ? curISP.Height : zoneObj.Height > curISP.Height ? curISP.Height : zoneObj.Height;
         }
       })
       // 如果有划分,求交集
@@ -488,7 +527,7 @@ export default {
         arr.map(t => {
           let temp = t.map(item => {
             return {
-              X: item.x,
+              X: 1 * item.x,
               Y: -item.y,
               Z: 0
             }
@@ -496,6 +535,7 @@ export default {
           zoneObj.Outline.push([temp]);
         })
       }
+      // 至此
       if (!zoneObj.Outline.length) {
         zoneObj.Outline = null;
       }
@@ -505,20 +545,71 @@ export default {
       this.createSingleBSP(zoneObj, IspaceIdList)
     },
     // 根据图从未关联平面图的业务空间中选择--按钮返回关联信号
-    createFromUnrelated(BSP) {
-      BSP.Outline = [];
-      BSP.Height = 0;
-      let arr = this.scene.getSelectedSpaces(), IspaceIdList = [];
-      arr.map(t => {
-        BSP.Outline.push(t.data.OutLine);
-        if (this.BIMIDToSID[t.data.SourceId]) {
-          IspaceIdList.push(this.BIMIDToSID[t.data.SourceId]);
-        }
-        if (t.Height && (BSP.Height == 0 || t.Height < BSP.Height)) {
-          BSP.Height = t.Height > 100 ? (t.Height / 1000).toFixed(2) : t.Height;
+    createFromUnrelated(zoneObj) {
+      // zoneObj.Outline = [];
+      // zoneObj.Height = 0;
+      // let spaces = {}, IspaceIdList = [];
+      // if (this.scene.cutItem || this.scene.sceneMark) {
+      //   // 如果有划分,求交集
+      //   // 格式为Poly(先与业务空间求差集)
+      //   const obj = this.scene.getZoneDifference(true);
+      //   // 差集与楼层平面图或用户划分区域求交集
+      //   spaces = this.scene.getPloyIntersect(obj)
+      // } else {
+      //   // 格式为SPoint[]
+      //   spaces = this.scene.getZoneDifference();
+      // }
+      // for (let key in spaces) {
+      //   spaces[key].map(t => {
+      //     let temp = t.map(item => {
+      //       return {
+      //         X: 1 * item.x.toFixed(2),
+      //         Y: -item.y.toFixed(2),
+      //         Z: 0
+      //       }
+      //     })
+      //     zoneObj.Outline.push([temp]);
+      //   })
+      //   let curISP = this.sourceIdToISP[key];
+      // if(curISP){
+      //   curISP && IspaceIdList.push(curISP.RoomID);
+      //   zoneObj.Height = zoneObj.Height == 0 ? curISP.Height : zoneObj.Height > curISP.Height ? curISP.Height : zoneObj.Height;
+      // }
+      // }
+
+      // 改回之前逻辑
+      zoneObj.Outline = [];
+      zoneObj.Height = 0;
+      let spaces = {}, IspaceIdList = [];
+      let selectSpaces = this.scene.getSelectedSpaces();
+      selectSpaces.map(t => {
+        zoneObj.Outline.push(t.data.OutLine);
+        let key = t.data.SourceId;
+        let curISP = this.sourceIdToISP[key];
+        if (curISP) {
+          curISP && IspaceIdList.push(curISP.RoomID);
+          zoneObj.Height = zoneObj.Height == 0 ? curISP.Height : zoneObj.Height > curISP.Height ? curISP.Height : zoneObj.Height;
         }
       })
-      this.updateBSPOutline(BSP, IspaceIdList)
+      // 如果有划分,求交集
+      if (this.scene.cutItem || this.scene.sceneMark) {
+        zoneObj.Outline = [];
+        let arr = this.scene.getIntersect();
+        arr.map(t => {
+          let temp = t.map(item => {
+            return {
+              X: 1 * item.x,
+              Y: -item.y,
+              Z: 0
+            }
+          })
+          zoneObj.Outline.push([temp]);
+        })
+      }
+      if (!zoneObj.Outline.length) {
+        zoneObj.Outline = null;
+      }
+      this.updateBSPOutline(zoneObj, IspaceIdList)
     },
     // 编辑空间详情
     editeSpaceDetail() {
@@ -602,8 +693,47 @@ export default {
     },
     // 根据图批量创建所选业务空间
     groupCreateZone() {
+      // let arr = this.scene.getSelectedSpaces();
+      // let createSpaces = [], spaces = {};
+      // if (this.scene.cutItem || this.scene.sceneMark) {
+      //   // 如果有划分,求交集
+      //   // 格式为Poly(先与业务空间求差集)
+      //   const obj = this.scene.getZoneDifference(true);
+      //   // 差集与楼层平面图或用户划分区域求交集
+      //   spaces = this.scene.getPloyIntersect(obj)
+      // } else {
+      //   // 格式为SPoint[]
+      //   spaces = this.scene.getZoneDifference();
+      // }
+      // for (let key in spaces) {
+      //   let zoneObj = { Outline: [], Height: 0 }
+      //   spaces[key].map(t => {
+      //     let temp = t.map(item => {
+      //       return {
+      //         X: 1 * item.x.toFixed(2),
+      //         Y: -item.y.toFixed(2),
+      //         Z: 0
+      //       }
+      //     })
+      //     zoneObj.Outline.push([temp]);
+      //   })
+      //   if (!zoneObj.Outline.length) {
+      //     continue
+      //   }
+      //   let curISP = this.sourceIdToISP[key];
+      // if (curISP) {
+      //   zoneObj.Height = zoneObj.Height == 0 ? curISP.Height : zoneObj.Height > curISP.Height ? curISP.Height : zoneObj.Height;
+      //   zoneObj.IspaceId = curISP.RoomID;
+      //   zoneObj.RoomLocalName = curISP.RoomLocalName;
+      // }
+      //   zoneObj.BuildingId = this.buildFloor[0];
+      //   zoneObj.FloorId = this.buildFloor[1];
+      //   createSpaces.push(zoneObj);
+      // }
+
+      // 改回之前逻辑
       let arr = this.scene.getSelectedSpaces();
-      let spaces = [];
+      let createSpaces = [];
       // 如果有划分,求交集
       if (this.scene.cutItem || this.scene.sceneMark) {
         let outlines = this.scene.getIntersectInSpace();
@@ -618,10 +748,10 @@ export default {
             return t;
           })
         }
-        spaces = arr.map(t => {
+        createSpaces = arr.map(t => {
           return {
             IspaceId: this.BIMIDToSID[t.data.SourceId],
-            RoomLocalName: t.data.Name,
+            RoomLocalName: this.BIMIDToSIName[t.data.SourceId],
             Outline: outlines[t.data.SourceId],
             BuildingId: this.buildFloor[0],
             FloorId: this.buildFloor[1],
@@ -629,10 +759,10 @@ export default {
           }
         }).filter(item => item.Outline && item.Outline.length)
       } else {
-        spaces = arr.map(t => {
+        createSpaces = arr.map(t => {
           return {
             IspaceId: this.BIMIDToSID[t.data.SourceId],
-            RoomLocalName: t.data.Name,
+            RoomLocalName: this.BIMIDToSIName[t.data.SourceId],
             Outline: [t.data.OutLine],
             BuildingId: this.buildFloor[0],
             FloorId: this.buildFloor[1],
@@ -640,11 +770,11 @@ export default {
           }
         })
       }
-      if (spaces.length) {
+      if (createSpaces.length) {
         this.canvasLoading = true;
-        this.groupCreateBSP(spaces)
+        this.groupCreateBSP(createSpaces)
       } else {
-        this.$message.warning('未选择本层空间');
+        this.$message.warning('未选择空间');
       }
     },
     // 更新业务空间和元空间的关系
@@ -806,9 +936,7 @@ export default {
       this.scene.clearCut();
     },
     // 撤销
-    undo() {
-
-    },
+    undo() { },
     // 反撤销
     redo() { },
     // 缩放

+ 6 - 3
src/components/business_space/newTables/eqToSpaceTable.vue

@@ -7,7 +7,7 @@
       </el-tooltip>
     </el-row>
     <div class="table-box">
-      <el-table :data="tableData" style="width: 100%" height="100%" :header-cell-style="headerStyle"  v-loading="loading">
+      <el-table :data="tableData" style="width: 100%" height="100%" :header-cell-style="headerStyle" v-loading="loading">
         <el-table-column :label="`${inSpaceType}名称`" show-overflow-tooltip min-width="100">
           <template slot-scope="scope">
             <div>
@@ -158,13 +158,16 @@ export default {
       this.$refs.addEqDialog.floor = this.params.buildFloorSelectd;
       this.$refs.addEqDialog.showDialog()
     },
-    changeContentStyle(){
-      this.$route.name == "spaceLedger"?this.hidden = false:this.hidden = true;
+    changeContentStyle() {
+      this.$route.name == "spaceLedger" ? this.hidden = false : this.hidden = true;
     }
   },
   watch: {
     type() {
       this.getTableData()
+    },
+    params() {
+      this.getTableData()
     }
   }
 };

+ 3 - 0
src/components/business_space/newTables/syInSpaceTable.vue

@@ -129,6 +129,9 @@ export default {
   watch: {
     type() {
       this.getTableData()
+    },
+    params() {
+      this.getTableData()
     }
   }
 };

+ 8 - 8
src/components/business_space/table/equipTable.vue

@@ -104,7 +104,7 @@
                     code: "EquipXSpace"
                 }],
                 activeRelation: "EquipinSpace",
-                relationType: {
+                CalcUrl: {
                     "code": "GeneralZone",
                     "name": "默认分区",
                     "rel_type": "99"
@@ -133,7 +133,7 @@
                     secret: this.secret
                 };
                 this.isLoading = true
-                if (this.relationType.rel_type == 99 && this.activeRelation == "EquipinSpace") {
+                if (this.CalcUrl.rel_type == 99 && this.activeRelation == "EquipinSpace") {
                     this.dataChange(param);
                 } else {
                     this.getRlations()
@@ -174,13 +174,13 @@
             getRlations() {
                 this.isLoading = true
                 this.relType = 0
-                if (this.relationType.rel_type == 99) {
+                if (this.CalcUrl.rel_type == 99) {
                     this.relType = "1"
                 } else {
-                    if (this.relationType.rel_type > 9) {
-                        this.relType = (this.relationType.rel_type * 100).toString()
+                    if (this.CalcUrl.rel_type > 9) {
+                        this.relType = (this.CalcUrl.rel_type * 100).toString()
                     } else {
-                        this.relType = '0' + (this.relationType.rel_type * 100)
+                        this.relType = '0' + (this.CalcUrl.rel_type * 100)
                     }
                 }
                 let param = {
@@ -280,7 +280,7 @@
              */
             getData(data, type) {
                 this.activeRelation = "EquipinSpace"
-                this.relationType = type
+                this.CalcUrl = type
                 this.page = {
                     size: 50,
                     sizes: [10, 30, 50, 100, 150, 200],
@@ -307,7 +307,7 @@
                     secret: this.secret
                 };
                 this.isLoading = true
-                if (this.relationType.rel_type == 99) {
+                if (this.CalcUrl.rel_type == 99) {
                     this.dataChange(param);
                 } else {
                     this.getRlations()

+ 2 - 1
src/components/config_point/dictionaryCascader.vue

@@ -77,7 +77,8 @@ export default {
 }
 </script>
 <style lang="less" scoped>
-.cascader-container {
+.cascader-container.el-form-item--small.el-form-item {
+  margin-bottom: 0;
   /deep/ .el-cascader {
     width: 89%;
     display: block;

+ 12 - 6
src/components/config_point/step3_edit/index.vue

@@ -4,27 +4,27 @@
       <ul>
         <li>
           <span>原始点位信息</span>&nbsp;&nbsp;&nbsp;
-          <span>{{editData.Point.Description || '--'}}</span>
+          <span :title="editData.Point.Description || '--'">{{editData.Point.Description || '--'}}</span>
         </li>
         <li>
           <span>位置标签</span>&nbsp;&nbsp;&nbsp;
-          <span>{{editData.Point.LocationFlag.toString() || '--'}}</span>
+          <span :title="editData.Point.LocationFlag.toString() || '--'">{{editData.Point.LocationFlag.toString() || '--'}}</span>
         </li>
         <li>
           <span>对象类型</span>&nbsp;&nbsp;&nbsp;
-          <span>{{editData.Point.KeyEquipmentType || '--'}}</span>
+          <span :title="editData.Point.KeyEquipmentType || '--'">{{editData.Point.KeyEquipmentType || '--'}}</span>
         </li>
         <li>
           <span>对象参数</span>&nbsp;&nbsp;&nbsp;
-          <span>{{editData.Point.KeyEquipmentParameter || '--'}}</span>
+          <span :title="editData.Point.KeyEquipmentParameter || '--'">{{editData.Point.KeyEquipmentParameter || '--'}}</span>
         </li>
         <li>
           <span>值/单位说明</span>&nbsp;&nbsp;&nbsp;
-          <span>{{editData.Point.ValueDescription || '--'}}</span>
+          <span :title="editData.Point.ValueDescription || '--'">{{editData.Point.ValueDescription || '--'}}</span>
         </li>
         <li>
           <span>备注</span>&nbsp;&nbsp;&nbsp;
-          <span>{{editData.Point.Remarks || '--'}}</span>
+          <span :title="editData.Point.Remarks || '--'">{{editData.Point.Remarks || '--'}}</span>
         </li>
       </ul>
     </div>
@@ -623,6 +623,12 @@ export default {
         text-align: right;
         width: 120px;
       }
+      span:nth-of-type(2) {
+        width: calc(100% - 120px);
+        overflow: hidden;
+        text-overflow:ellipsis;
+        white-space: nowrap;
+      }
     }
   }
   .right {

+ 5 - 5
src/components/config_point/step3_point/3_temps.vue

@@ -21,7 +21,7 @@
           <p class="content-view p10">{{delDataSource(unitObj.DataSource)}}</p>
         </div>
       </div>
-      <div class="center">
+      <div class="center" style="margin-top:20px;">
         <el-button @click="next">下一步</el-button>
       </div>
     </div>
@@ -49,7 +49,7 @@
         <formula-handle :devFlag="false" ref='formulaHandle' v-else-if='form2.DataRuleType == "需按公式转换"'></formula-handle>
         <!-- <split-handle :devFlag="false" ref='splitHandle' v-else-if='form2.DataRuleType == "需按拆分枚举转换"'></split-handle> -->
       </el-form>
-      <div class="center">
+      <div class="center" style="margin-top:20px;">
         <el-button @click="undo">上一步</el-button>
         <el-button @click="next">下一步</el-button>
       </div>
@@ -64,7 +64,7 @@
       <div v-if="pages.total>pages.size" class="right">
         <pagination :page="pages" @change="changePage"></pagination>
       </div>
-      <div class="center">
+      <div class="center" style="margin-top:20px;">
         <el-button @click="undo">上一步</el-button>
         <el-button v-show="renderData.length" @click="save">保存</el-button>
       </div>
@@ -686,7 +686,7 @@ export default {
   .flex-around {
     display: flex;
     justify-content: space-around;
-    margin-bottom: 5px;
+    // margin-bottom: 5px;
     width: 100%;
     overflow: hidden;
     .point-despoint {
@@ -701,7 +701,7 @@ export default {
     }
   }
   .collapse-item {
-    height: 290px;
+    height: 328px;
     overflow-y: auto;
   }
 }

+ 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) => a.time - b.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>

+ 3 - 0
src/components/data_admin/buildTask/dialog/modelTaskDialog.vue

@@ -63,6 +63,9 @@ export default {
       options: [{//方案
         value: '1',
         label: '标准'
+      }, {
+        value: '2',
+        label: '极简'
       }],
       tableData: [],
       loading: false,

+ 3 - 1
src/components/data_admin/buildTask/table/assetsTable.vue

@@ -50,7 +50,7 @@ export default {
     assetsDetail
   },
   computed: {
-    ...mapGetters("layout", ["projectId"])
+    ...mapGetters("layout", ["projectId", "userInfo"])
   },
   props: {
     paramsData: Object,
@@ -157,6 +157,8 @@ export default {
     handleConfirm(index, row){
       let params = {
         Content: [{
+          ConfirmingPersonId: this.userInfo.userId,
+          ConfirmingPersonName: this.userInfo.userName,
           TaskId: row.TaskId,
           TaskState: 0
         }]

+ 3 - 1
src/components/data_admin/buildTask/table/deviceTable.vue

@@ -59,7 +59,7 @@ export default {
     deviceDetail
   },
   computed: {
-    ...mapGetters("layout", ["projectId"])
+    ...mapGetters("layout", ["projectId", "userInfo"])
   },
   props: {
     paramsData: Object,
@@ -185,6 +185,8 @@ export default {
     handleConfirm(index, row){
       let params = {
         Content: [{
+          ConfirmingPersonId: this.userInfo.userId,
+          ConfirmingPersonName: this.userInfo.userName,
           TaskId: row.TaskId,
           TaskState: 0
         }]

+ 3 - 1
src/components/data_admin/buildTask/table/modelTable.vue

@@ -53,7 +53,7 @@ export default {
     deviceDetail
   },
   computed: {
-    ...mapGetters("layout", ["projectId"])
+    ...mapGetters("layout", ["projectId", "userInfo"])
   },
   props: {
     paramsData: Object,
@@ -175,6 +175,8 @@ export default {
     handleConfirm(index, row){
       let params = {
         Content: [{
+          ConfirmingPersonId: this.userInfo.userId,
+          ConfirmingPersonName: this.userInfo.userName,
           TaskId: row.TaskId,
           TaskState: 0
         }]

+ 26 - 46
src/components/dialogs/changeRea.vue

@@ -6,12 +6,13 @@
     <div>
       <div id="changeRea">
         <div class="title-search" style="margin-bottom: 10px;">
-          <el-input placeholder="输入名称或编码查询" v-model="search" size="small" style="width:300px;" clearable></el-input>
+          <floor-cascader @change="changeFloor"></floor-cascader>
+          <el-input placeholder="输入本地名称或本地编码查询" v-model="search" size="small" style="width:250px;marginLeft:30px;" clearable></el-input>
           <el-button @click="getPropertyData" size="small">查找</el-button>
         </div>
-        <div>
+        <!-- <div>
           <floor-cascader @change="changeFloor"></floor-cascader>
-        </div>
+        </div> -->
         <el-radio-group v-model="radio" style="width:100%;">
           <el-table :data="tableData" style="width: 100%" height="300px">
             <el-table-column label="资产名称">
@@ -25,10 +26,14 @@
               <template slot-scope="scope">{{scope.row.EquipLocalID || scope.row.EquipID}}</template>
             </el-table-column>
             <el-table-column prop="name" label="所在楼层">
-              <template slot-scope="scope">{{getFloor(scope.row.FloorId)}}</template>
+              <template slot-scope="scope">
+                {{ scope.row.Building?scope.row.Building.BuildLocalName?scope.row.Building.BuildLocalName:'':'' }}-{{ scope.row.Floor?scope.row.Floor.FloorLocalName?scope.row.Floor.FloorLocalName:'':'' }}
+              </template>
             </el-table-column>
             <el-table-column label="设备族">
-              <span>{{this.category.assetName}}</span>
+              <template slot-scope="scope">
+                {{scope.row.EquipFamilyList[0].FamilyName}}
+              </template>
             </el-table-column>
             <el-table-column label="安装位置">
               <template slot-scope="scope">
@@ -48,7 +53,7 @@
 <script>
 import myPagination from "@/components/ledger/lib/myPagination";
 import paramDetails from "@/components/dialogs/list/paramDetails"
-import { getSpaceFloor, queryProperty } from "@/api/scan/request"
+import { queryProperty } from "@/api/scan/request"
 import floorCascader from "@/components/ledger/lib/floorCascader";
 import { mapGetters, mapActions } from "vuex"
 export default {
@@ -86,36 +91,13 @@ export default {
       },
       mess: {},
       codeListCode: [],
-      floorList: []
     };
   },
-  created() {
-    this.getFloorList();
-  },
   computed: {
     ...mapGetters("layout", ["projectId", "secret", "userId"])
   },
   mounted() { },
   methods: {
-    //根据楼层id对应楼层
-    getFloor(relation) {
-      let floor = !!relation ? relation.floor || "" : ""
-      if (!!floor) {
-        let floorName = ""
-        this.floorList.map(item => {
-          if (!!item.floors && item.floors.length) {
-            item.floors.map(child => {
-              if (child.id == floor) {
-                floorName = child.infos.FloorLocalName || child.infos.FloorName
-              }
-            })
-          }
-        })
-        return floorName
-      } else {
-        return "--"
-      }
-    },
     //确认选择
     clickTrue() {
       if (this.radio) {
@@ -125,22 +107,6 @@ export default {
         this.$message("请先选择资产")
       }
     },
-    //查询条件-所在建筑楼层
-    getFloorList() {
-      let param = {
-        secret: this.secret,
-        ProjId: this.projectId
-      }
-      getSpaceFloor(param).then(res => {
-        if (res.data.Result == "success") {
-          this.floorList = res.data.Content
-        } else {
-          this.$message.error("请求错误:" + res.data.ResultMsg)
-        }
-      }).catch(_ => {
-        this.$message.error("请求错误")
-      })
-    },
     //所在建筑楼层修改
     changeFloor(val) {
       this.mess = {
@@ -166,6 +132,20 @@ export default {
     //查询表数据
     getPropertyData() {
       let param = { 
+        Cascade: [
+          {
+            Name: "equipFamilyList",
+            Projection: [ "Family", "FamilyName" ]
+          },
+          {
+            Name: "building",
+            Projection: ["BuildLocalName", "BuildName", "BuildID"]
+          },
+          {
+            Name: "floor",
+            Projection: ["FloorLocalName", "FloorName", "FloorID"]
+          }
+        ],
         Filters: `EquipmentId isNull;Family="${this.category.assetType}"`,
         PageNumber: this.page.currentPage,
         PageSize: this.page.size
@@ -184,7 +164,7 @@ export default {
       }
       //名称和编码
       if (this.search) {
-        param.Filters += `;floorId='${this.mess.floorId}'`
+        param.Filters += `;EquipLocalName contain '${this.search}' || EquipLocalID contain '${this.search}'`
       }
       queryProperty(param, res => {
         this.tableData = res.Content

File diff ditekan karena terlalu besar
+ 591 - 493
src/components/dialogs/list/batchDialog.vue


+ 2 - 1
src/components/dialogs/list/filesDialog.vue

@@ -13,7 +13,8 @@
                 :keysArr="keysArr"
                 :firmDataType="firmDataType"
                 @change="changeItem"
-                max="2"/>
+                max="2"
+            />
         </div>
     </el-dialog>
 </template>

+ 149 - 143
src/components/dialogs/list/picDialog.vue

@@ -3,160 +3,166 @@
 -->
 
 <template>
-    <el-dialog title="上传图片" :visible.sync="dialog.pic" width="500px;">
-        <div style="max-height:500px;overflow-y:auto;">
-            <div>
-                <h3>设备图片</h3>
-                <upload-imgs
-                    :readOnly="read"
-                    :keysArr="picArrs"
-                    @change="imageItem"
-                    max="6"
-                />
-            </div>
-            <div>
-                <h3>视频</h3>
-                <upload-imgs
-                    :accept="'video/*'"
-                    type="video"
-                    :keysArr="videoArr"
-                    @change="videoItem"
-                    :videoPicArr="videoPicArr"
-                    max="2"
-                    :readOnly="read"
-                />
-            </div>
-        </div>
-    </el-dialog>
+  <el-dialog title="上传图片" :visible.sync="dialog.pic" width="500px;">
+    <div style="max-height:500px;overflow-y:auto;">
+      <div>
+        <h3>设备图片</h3>
+        <upload-imgs
+            :readOnly="read"
+            :keysArr="picArrs"
+            @change="imageItem"
+
+        />
+      </div>
+      <!--          max="6"-->
+      <div>
+        <h3>视频</h3>
+        <upload-imgs
+            :accept="'video/*'"
+            type="video"
+            :keysArr="videoArr"
+            @change="videoItem"
+            :videoPicArr="videoPicArr"
+            :readOnly="read"
+        />
+        <!--              max="2"-->
+      </div>
+    </div>
+  </el-dialog>
 </template>
 <script>
-    import uploadImgs from "@/components/ledger/lib/uploadImgsName";
+  import uploadImgs from "@/components/ledger/lib/uploadImgsName";
 
-    export default {
-        components: {
-            uploadImgs
-        },
-        props: {
-            dialog: {
-                type: Object,
-                default: function () {
-                    return {
-                        pic: true
-                    };
-                }
-            },
-            keysArr: {
-                type: Array,
-                default: function () {
-                    return []
-                }
-            },
-            read: {
-                type: Boolean,
-                default: false
-            },
-            firmDataType: {
-                type: String
-            },
-            information: {
-                type: Object
-            },
-            infoType: {
-                type: String
-            }
-        },
-        data() {
-            return {
-                picArrs: [],
-                panoramaArr: [],
-                videoArr: [],
-                videoPicArr: [],
-                changeKeys: []
-            };
-        },
-        created() {
-        },
-        mounted() {
-        },
-        methods: {
-            imageItem(images) {
-                this.picArrs = images
-                this.change()
-            },
+  export default {
+    components: {
+      uploadImgs
+    },
+    props: {
+      dialog: {
+        type: Object,
+        default: function () {
+          return {
+            pic: true
+          };
+        }
+      },
+      keysArr: {
+        type: Array,
+        default: function () {
+          return []
+        }
+      },
+      read: {
+        type: Boolean,
+        default: false
+      },
+      firmDataType: {
+        type: String
+      },
+      information: {
+        type: Object
+      },
+      infoType: {
+        type: String
+      }
+    },
+    data() {
+      return {
+        picArrs: [],
+        panoramaArr: [],
+        videoArr: [],
+        videoPicArr: [],
+        changeKeys: []
+      };
+    },
+    created() {
+    },
+    mounted() {
+    },
+    methods: {
+      imageItem(images) {
+        this.picArrs = images
+        this.change()
+      },
 
-            panoramaItem(images) {
-                this.panoramaArr = images
-                this.change()
-            },
+      panoramaItem(images) {
+        this.panoramaArr = images
+        this.change()
+      },
 
-            videoItem(videos, pe, pics) {
-                this.videoArr = videos
-                this.videoPicArr = pics
-                this.change()
-            },
+      videoItem(videos, pe, pics) {
+        this.videoArr = videos
+        this.videoPicArr = pics
+        this.change()
+      },
 
-            change() {
-                //   let picsArr = this.getArr(this.picArrs, "设备图片", "image")
-                //   let videos = this.getArr(this.videoArr, "视频", "video")
-                //   let videoPics = this.getArr(this.videoPicArr, "视频资料", "image_video")
-                //   let panoramas = this.getArr(this.panoramaArr, "全景照片", "panorama")
-                let picsArr = this.picArrs
-                let videos = this.videoArr
-                let videoPics = this.videoPicArr
-                let panoramas = this.panoramaArr
-                this.changeKeys = picsArr.concat(videos).concat(videoPics).concat(panoramas)
-                if (this.firmDataType === 'dialog') {
-                    this.information.pic.Pic = this.changeKeys
-                    this.$emit("change",this.information,this.firmDataType)
-                } else {
-                    this.$emit("change", this.changeKeys)
+      change() {
+        //   let picsArr = this.getArr(this.picArrs, "设备图片", "image")
+        //   let videos = this.getArr(this.videoArr, "视频", "video")
+        //   let videoPics = this.getArr(this.videoPicArr, "视频资料", "image_video")
+        //   let panoramas = this.getArr(this.panoramaArr, "全景照片", "panorama")
+        let picsArr = this.picArrs
+        let videos = this.videoArr
+        let videoPics = this.videoPicArr
+        let panoramas = this.panoramaArr
+        this.changeKeys = picsArr.concat(videos).concat(videoPics).concat(panoramas)
+        if (this.firmDataType === 'dialog') {
+          this.information.pic.Pic = this.changeKeys
+          this.$emit("change", this.information, this.firmDataType)
+        } else {
+          this.$emit("change", this.changeKeys)
 
-                }
-            },
+        }
+      },
 
-            getArr(arr, name, type) {
-                return arr.map(item => {
-                    return {"systemId": "dataPlatform", "name": name, "type": type, "key": item}
-                })
-            },
+      getArr(arr, name, type) {
+        return arr.map(item => {
+          return {
+            "SystemId": "dataPlatform",
+            "Name": name,
+            "Type": type,
+            "Key": item,
+          }
+        })
+      },
 
-            //将父组件传来的数据进行分组
-            fatherTochild() {
-                this.panoramaArr = []
-                this.videoArr = []
-                this.videoPicArr = []
-                this.picArrs = []
-                if (this.keysArr instanceof Array) {
-                    this.keysArr.map(item => {
-                        if (item.type == 'panorama') {
-                            this.panoramaArr.push(item)
-                        } else if (item.type == "video") {
-                            this.videoArr.push(item)
-                        } else if (item.type == 'image_video') {
-                            this.videoPicArr.push(item)
-                        } else {
-                            this.picArrs.push(item)
-                        }
-                    })
-                } else {
-                    this.panoramaArr = []
-                    this.videoArr = []
-                    this.videoPicArr = []
-                    this.picArrs = []
-                }
-            }
-        },
-        watch: {
-            dialog: {
-                deep: true,
-                handler: function () {
-                    if (this.dialog.pic) {
-                        this.fatherTochild()
-                    }
-                }
+      //将父组件传来的数据进行分组
+      fatherTochild() {
+        this.panoramaArr = []
+        this.videoArr = []
+        this.videoPicArr = []
+        this.picArrs = []
+        if (this.keysArr instanceof Array) {
+          this.keysArr.map(item => {
+            if (item.type == 'panorama') {
+              this.panoramaArr.push(item)
+            } else if (item.type == "video") {
+              this.videoArr.push(item)
+            } else if (item.type == 'image_video') {
+              this.videoPicArr.push(item)
+            } else {
+              this.picArrs.push(item)
             }
+          })
+        } else {
+          this.panoramaArr = []
+          this.videoArr = []
+          this.videoPicArr = []
+          this.picArrs = []
+        }
+      }
+    },
+    watch: {
+      dialog: {
+        deep: true,
+        handler: function () {
+          if (this.dialog.pic) {
+            this.fatherTochild()
+          }
         }
-    };
+      }
+    }
+  };
 </script>
 <style>
 </style>

+ 0 - 1
src/components/dialogs/list/uploadImgDialog.vue

@@ -54,7 +54,6 @@
         },
         methods: {
     deepcopy(obj) {
-      console.log(obj, "out")
       return JSON.parse(JSON.stringify(obj));
     },
     changeItem(file) {

+ 1 - 1
src/components/echarts/doughnut.vue

@@ -1,5 +1,5 @@
 <template>
-    <div style="width:100%;height:100%;" :id="id">
+    <div style="width:100%;height:100%;textAlign:center;" :id="id">
     </div>
 </template>
 <script>

+ 99 - 0
src/components/echarts/fanChart.vue

@@ -0,0 +1,99 @@
+<template>
+  <!-- 饼图 -->
+  <div style="width:100%;height:100%;textAlign:center;margin:-15px 0;" :id="id">
+  </div>
+</template>
+<script>
+import echarts from "echarts"
+export default {
+  name: "doughnut",
+  props: {
+    id: {
+      type: String,
+      default: function createRandomId() {
+        return (Math.random() * 10000000).toString(16).substr(0, 4) + '-' + (new Date()).getTime() + '-' + Math.random().toString().substr(2, 5);
+      }
+    },
+    renderData: {
+      type: Array,
+      default: function () {
+        return []
+      }
+    },
+    type: {},
+    name: "",
+    sum: ""
+  },
+  data() {
+    return {
+      myCharts: null
+    }
+  },
+  created() { },
+  mounted() {
+    this.drawDoughnut()
+  },
+  methods: {
+    drawDoughnut() {
+      let options = {
+        tooltip: {
+          trigger: 'item',
+          formatter: ""
+        },
+        series: [
+          {
+            // name: '占比',
+            type: 'pie',
+            radius: '55%',
+            center: ['50%', '60%'],
+            data: this.renderData,
+            label: {
+              normal: {
+                show: true,
+                position: 'outside',
+                textStyle: {
+                  fontSize: '11'
+                }
+              },
+              emphasis: {
+                show: true
+              }
+            },
+            labelLine: {
+              normal: {
+                show: true,
+                length: 20,
+                lineStyle: {
+                  color: '#999'
+                }
+              },
+              emphasis: {
+                show: true
+              }
+            }
+          },
+        ],
+      }
+      this.myCharts = echarts.init(document.getElementById(this.id))
+      this.myCharts.setOption(options)
+    },
+    delName(val) {
+      if (!!val && val.length > 3) {
+        return val.substring(0, 3) + '...'
+      } else {
+        return ''
+      }
+    }
+  },
+  watch: {
+    renderData: {
+      deep: true,
+      handler: function () {
+        this.drawDoughnut()
+      }
+    }
+  }
+}
+</script>
+<style>
+</style>

+ 118 - 0
src/components/echarts/reportDoughnut.vue

@@ -0,0 +1,118 @@
+<template>
+  <div style="width:100%;height:100%;text-align:center;" :id="id">
+  </div>
+</template>
+<script>
+import echarts from "echarts"
+export default {
+  name: "doughnut",
+  props: {
+    id: {
+      type: String,
+      default: function createRandomId() {
+        return (Math.random() * 10000000).toString(16).substr(0, 4) + '-' + (new Date()).getTime() + '-' + Math.random().toString().substr(2, 5);
+      }
+    },
+    renderData: {
+      type: Array,
+      default: function () {
+        return []
+      }
+    },
+    text: {
+      type: String,
+    },
+    type: {},
+    name: "",
+    sum: ""
+  },
+  data() {
+    return {
+      myCharts: null
+    }
+  },
+  created() { },
+  mounted() {
+    this.drawDoughnut()
+  },
+  methods: {
+    drawDoughnut() {
+      let options = {
+        tooltip: {
+          trigger: 'item',
+          formatter: "{b}"
+        },
+        legend: {
+          show: false,
+          orient: 'vertical',
+          right: 10,
+          top: 30,
+          bottom: 20,
+          data: this.renderData.map(item => {
+            return item.name
+          })
+        },
+        series: [{
+          name: '',
+          type: 'pie',
+          radius: ['40%', '60%'],
+          itemStyle: {
+            normal: {
+              label: {
+                show: this.type != 'left' ? false : true,
+                textStyle: {
+                  color: '#3c4858',
+                  fontSize: "12"
+                },
+                formatter: function (val) { //让series 中的文字进行换行
+                  return val.name.split("-")[0];
+                }
+              },
+              title: {
+                text: 'aaaa'
+              },
+              labelLine: {
+                show: this.type != 'left' ? false : true,
+                lineStyle: {
+                }
+              }
+            },
+            emphasis: {
+              shadowBlur: 5,
+              shadowOffsetX: 0,
+              shadowColor: 'rgba(0, 0, 0, 0.5)',
+              textColor: '#000'
+            }
+          },
+          data: this.renderData
+        }],
+        color: ['#67C23A', 'rgb(225, 243, 216)', 'rgb(244, 244, 245)']
+      }
+      options.graphic = {
+        type: 'text',
+        left: 'center',
+        top: 'center',
+        style: {
+          text: `${this.text|| ''}`,
+          textAlign: 'center',
+          fill: '#000',
+          width: 30,
+          height: 30
+        }
+      }
+      this.myCharts = echarts.init(document.getElementById(this.id))
+      this.myCharts.setOption(options)
+    }
+  },
+  watch: {
+    'renderData': {
+      deep: true,
+      handler(n,o) {
+        this.drawDoughnut()
+      }
+    }
+  }
+}
+</script>
+<style>
+</style>

+ 32 - 6
src/components/globaluploader/index.vue

@@ -2,7 +2,7 @@
  * @Author: zhangyu
  * @Date: 2019-11-28 10:05:28
  * @Info: 
- * @LastEditTime: 2019-12-11 10:50:07
+ * @LastEditTime : 2020-01-03 15:31:04
  -->
 <template>
   <div id="global-uploader">
@@ -11,11 +11,13 @@
     <uploader
         ref="uploader"
         :options="options"
+        :fileStatusText="fileStatusText"
         :autoStart="false"
         @file-added="onFileAdded"
         @file-success="onFileSuccess"
         @file-progress="onFileProgress"
         @file-error="onFileError"
+        @file-removed="onFileRemoved"
         class="uploader-app">
       <uploader-unsupport></uploader-unsupport>
 
@@ -26,8 +28,8 @@
           <div class="file-title">
             <h2>文件列表</h2>
             <div class="operate">
-              <el-button @click="fileListShow" style="color:#999;" type="text" :title="collapse ? '展开':'折叠' ">
-                <i class="iconfont" :class="collapse ? 'icon-shenglvehao': 'icon-shenglvehao'"></i>
+              <el-button @click="fileListShow" style="color:#999;" type="text" :title="collapse ? '折叠':'展开' ">
+                <i class="iconfont" :class="collapse ? 'icon-bottom': 'icon-top'"></i>
               </el-button>
               <el-button @click="close" style="color:#999;" type="text" title="关闭">
                 <i class="iconfont icon-guanbi"></i>
@@ -68,11 +70,18 @@ import { mapGetters, mapMutations } from 'vuex'
 export default {
   data() {
     return {
+      fileStatusText: {
+        success: '成功',
+        error: '失败',
+        uploading: '上传中',
+        paused: '暂停',
+        waiting: '等待'
+      },
       options: {
         target: '/image-service/common/multipart_upload',
         chunkSize: 1*1024*1024,
         fileParameterName: 'file',
-        maxChunkRetries: 5,
+        maxChunkRetries: 3,
         testChunks: false,   //是否开启服务器分片校验
         // 服务器分片校验函数,秒传及断点续传基础
         // checkChunkUploadedByResponse: function (chunk, message) {
@@ -122,7 +131,7 @@ export default {
               })
               this.uploader.addFile(file)
               this.setUploaderList(this.uploader.files.map(item => {
-                item.modelId = item.file.modelId?item.file.modelId:''
+                item.modelId = item.file.modelId?item.file.modelId:'';
                 return item
               }))
             } else {
@@ -206,6 +215,18 @@ export default {
         type: 'error'
       })
     },
+    onFileRemoved(file) {
+      this.uploaderList.splice(this.uploaderList.findIndex(item => {
+        return item.id == file.id;
+      },1))
+      this.setUploaderList(this.uploaderList);
+      if(file.modelId && !file.isComplete()) {
+        request.deleteModelFileList({Id: file.modelId, Force: true}, res => {
+          console.log('删除错误模型:',file.modelId);
+          Bus.$emit('modelStatusChange')
+        })
+      }
+    },
 
     /**
      * 计算md5,实现断点续传及秒传
@@ -312,6 +333,8 @@ export default {
               if (action == "confirm") {
                 this.uploader.cancel();
                 this.panelShow = false;
+                this.uploader.files = [];
+                this.setUploaderList([]);
                 Bus.$emit('modelStatusChange')
               } else { }
             }
@@ -396,7 +419,7 @@ export default {
 <style scoped lang="scss">
 #global-uploader {
   position: fixed;
-  z-index: 20;
+  z-index: 101;
   top: auto;
   right: 15px;
   bottom: 0;
@@ -444,6 +467,9 @@ export default {
       > li {
         background-color: #fff;
       }
+      /deep/ .uploader-file-info i{
+        display: none;
+      }
       /deep/ .status_style{
         position: absolute;
         top: 0;

File diff ditekan karena terlalu besar
+ 987 - 939
src/components/ledger/handsontables/assets.vue


File diff ditekan karena terlalu besar
+ 1068 - 1010
src/components/ledger/handsontables/device.vue


+ 14 - 10
src/components/ledger/lib/cascader.vue

@@ -1,8 +1,9 @@
 <template>
   <div id="cascaderMap">
     <span class="buildFloor" style="margin-right: 12px;">设备类别</span>
-    <el-select v-model="value" placeholder="请选择" clearable :props="props" filterable :style="isWidth ? '' : 'width:160px;'" size="small" @change="changeVal">
-      <el-option  v-for="item in options" :key="item.code" :label="item.facility" :value="item.code"></el-option>
+    <el-select v-model="value" placeholder="请选择" clearable :props="props" filterable :style="isWidth ? '' : 'width:160px;'" size="small"
+      @change="changeVal">
+      <el-option v-for="item in options" :key="item.code" :label="item.facility" :value="item.code"></el-option>
     </el-select>
     <!-- <el-cascader placeholder="请选择" :options="options" v-model="value" :props="props" filterable :style="isWidth ? '' : 'width:160px;'" size="small"
       @change="changeVal" change-on-select></el-cascader> -->
@@ -54,12 +55,18 @@ export default {
     //修改val
     changeVal(val) {
       let value = {}
+      let flag = true;
       this.options.map(item => {
         if (item.code == val) {
+          flag = false;
           value = item
         }
       })
       this.value = val
+      if (flag) {
+        this.value = '';
+      }
+      console.log(value)
       this.$emit("change", value)
     },
     //获取当前项目下的设备类型(只拿到编码-需要过滤)
@@ -93,20 +100,17 @@ export default {
           resolve(res)
         })
       })
-      Promise.all([promise1,promise2]).then((res) => {
+      Promise.all([promise1, promise2]).then((res) => {
         let allData = res[0], data = res[1]
         this.options = this.formatOptions(allData.Content)
-        if (this.value) {
-          this.changeVal(this.value)
-        }
-        if(!this.all) {
+        if (!this.all) {
           this.content = data.Content.map(t => {
             return t.Category
           });
           this.filterForOptions();
-          if (this.value) {
-            this.changeVal(this.value)
-          }
+        }
+        if (this.value) {
+          this.changeVal(this.value)
         }
       })
     },

+ 52 - 60
src/components/ledger/lib/cenoteGraphy.vue

@@ -9,7 +9,8 @@
     <div class="canvas-box" v-show="floorMap" v-loading="canvasLoading">
       <canvas id="floorCanvas" :width="canvasWidth" :height="canvasHeight" ref="canvas" tabindex="0"></canvas>
       <el-row class="canvas-actions-box">
-        <canvasFun @scale="scale" @fit="fit" @savePng="savePng" @saveSvg="saveSvg" @saveJson="saveJson" :config="config" ref="canvasFun"></canvasFun>
+        <canvasFun @scale="scale" @groupSelect="groupSelect" @fit="fit" @savePng="savePng" @saveSvg="saveSvg" @saveJson="saveJson" :config="config"
+          ref="canvasFun"></canvasFun>
       </el-row>
     </div>
   </div>
@@ -40,7 +41,8 @@ export default {
       selectAble: false,
       relatedSpaceIdList: [],//已关联的业务空间id
       config: {
-        isEdit: false
+        isEdit: false,
+        groupSelect: true
       },
     }
   },
@@ -68,7 +70,7 @@ export default {
           this.getGraphy();
         })
       }
-      else{
+      else {
         this.floorMap = '';
       }
     },
@@ -86,7 +88,6 @@ export default {
       let that = this;
       that.clearGraphy()
       that.scene = new DivideFloorScene();
-      that.scene.isSpaceSelectable = false;
       that.canvasLoading = true;
       that.scene.loadUrl(`/image-service/common/file_get?systemId=revit&key=${this.floorMap}`).then(res => {
         that.canvasLoading = false;
@@ -96,6 +97,7 @@ export default {
           return;
         }
         that.view.scene = that.scene;
+        that.scene.isSpaceSelectable = false;
         // 绘制业务空间
         that.getBusinessSpace();
         that.view.fitSceneToView();
@@ -108,7 +110,6 @@ export default {
     // 获取当前分区下的业务空间
     getBusinessSpace() {
       this.canvasLoading = true
-      this.clearZoneCanvas();
       let promise1 = new Promise((resolve, reject) => {
         let params = {
           data: {
@@ -155,81 +156,67 @@ export default {
         })
         // 绘制业务空间
         let tempArr = this.BSPRelaISPList.map((t, i) => {
-          let item = {
-            RoomLocalName: t.RoomLocalName,
-            OutLine: t.Outline,
-            RoomID: t.RoomID,
-            Color: colorArr[i % colorArr.length],
+          if (t.FloorId == this.buildingData[1] && t.ObjectType == this.space) {
+            return {
+              RoomLocalName: t.RoomLocalName,
+              OutLine: t.Outline,
+              RoomID: t.RoomID,
+              Color: colorArr[i % colorArr.length],
+              HighLightFlag: relatedZone.findIndex((item) => (item.RoomID == t.RoomID)) > -1,
+              Transparency: relatedZone.findIndex((item) => (item.RoomID == t.RoomID)) > -1 ? 20 : 1
+            }
+          } else {
+            return undefined
           }
-          return item;
-        })
-        this.scene.zoneList = [];
+        }).filter(item => item)
+        this.scene.removeAllZone();
         this.scene.addZoneList(tempArr);
         this.scene.click(this, this.canvasClick);
-        this.zoneList = this.scene.zoneList;
-        this.scene.zoneList.map(t => {
-          t.selected = false;
-          if (this.relatedSpaceIdList.indexOf(t.data.RoomID) != -1) {
-            // t.selected = true;
-            t.highLightFlag = true;
-          }
-        })
         this.canvasLoading = false;
       })
     },
     // canvas点击事件
     canvasClick(item, event) {
-      if (item.selectable) {
-        if (this.selectAble) {
-          if (this.relatedSpaceIdList.indexOf(item.data.RoomID) != -1) {
-            this.relatedSpaceIdList = this.relatedSpaceIdList.filter(t => { return t != item.data.RoomID });
-          }
-          else {
-            this.relatedSpaceIdList.push(item.data.RoomID);
-          }
-        }
-        else {
-          item.selected = !item.selected;
-        }
+      if (!this.config.isEdit) {
+        item.selected = false;
       }
     },
     //取消编辑
     cancelEdit() {
+      this.config.isEdit = false;
+      this.scene.clearZoneSelection();
       this.getBusinessSpace();
     },
+    //编辑
+    edit() {
+      this.config.isEdit = true;
+      this.scene.zoneList.map(t => {
+        t.selected = t.highLightFlag;
+        t.transparency = 20;
+        t.highLightFlag = false;
+      })
+    },
     //保存编辑
     saveEdit() {
+      let arr = this.scene.getSelectedZone();
       let param = {
         BuildingId: this.buildingData[0],
         FloorId: this.buildingData[1],
         Type: this.space,
         data: {
           ShaftId: this.$route.query.ShaftId,
-          SpaceIdList: this.relatedSpaceIdList
+          SpaceIdList: []
         }
       }
+      param.data.SpaceIdList = arr.map(t => {
+        return t.data.RoomID;
+      })
       shaftZoneLink(param, res => {
-        if (res.Result == "success") {
-          this.$message.success("保存成功");
-          this.getBusinessSpace();
-        }
+        this.config.isEdit = false;
+        this.$message.success("保存成功");
+        this.getBusinessSpace();
       })
     },
-    //是否可点
-    setSelectAble(val) {
-      if (this.scene) {
-        this.selectAble = val && !this.$route.query.onlyRead;
-        if (this.selectAble) {
-          this.scene.zoneList.map(t => {
-            t.highLightFlag = false;
-            t.selected = false;
-            if (this.relatedSpaceIdList.indexOf(t.data.RoomID) != -1) {
-              t.selected = true;
-            }
-          })
-        }
-      }
-    },
     // 清除canvas
     clearGraphy() {
       // debugger
@@ -240,12 +227,6 @@ export default {
       }
       this.view = new FloorView('floorCanvas')
     },
-    // 清空绘制业务空间
-    clearZoneCanvas() {
-      this.zoneList.map(t => {
-        this.scene.removeItem(t);
-      })
-    },
     // 适配底图到窗口
     fit() {
       this.view.fitSceneToView()
@@ -266,6 +247,10 @@ export default {
     saveSvg() {
       this.view.saveSceneSvg(`${this.buildingData[1]}.svg`, 6400, 4800);
     },
+    // 框选
+    groupSelect() {
+      this.scene.isRectSelection = 2;
+    },
     // 保存json
     saveJson() {
       this.view.saveFloorJson(`${this.buildingData[1]}.json`)
@@ -279,7 +264,14 @@ export default {
           this.$refs.canvasFun.sliderVal = s > 1000 ? 1000 : s;
         }
       }
-    }
+    },
+    "scene.isRectSelection": {
+      handler(n) {
+        if (!n) {
+          this.$refs.canvasFun.active = '';
+        }
+      }
+    },
   }
 }
 </script>

+ 12 - 0
src/components/ledger/lib/editSysFloor.vue

@@ -27,6 +27,11 @@ export default {
   components: {
     bfCascader
   },
+  props: {
+    isCreate: {
+      default: false
+    }
+  },
   methods: {
     showDialog(system) {
       this.system = system;
@@ -48,6 +53,13 @@ export default {
       })
     },
     save() {
+      // 如果是创建
+      if (this.isCreate) {
+        let data = this.$refs.bfCascader.getSelectedNodes();
+        this.connectDialogVis = false;
+        this.$emit('relateSuccess', data);
+        return
+      }
       let arr = this.$refs.bfCascader.value;
       let buildIds = [], floorIds = [];
       arr.map(t => {

+ 9 - 4
src/components/ledger/lib/lookImages.vue

@@ -53,9 +53,9 @@
   </el-dialog>
 </template>
 <script>
-import uploadImgs from "@/components/ledger/lib/uploadImgsName";
-import tools from "@/utils/scan/tools";
-export default {
+  import uploadImgs from "@/components/ledger/lib/uploadImgsName";
+
+  export default {
   components: {
     uploadImgs
   },
@@ -159,7 +159,12 @@ export default {
           console.log(iframe)
           iframe.onload = () => {
             console.log("onload")
-            iframe.contentWindow.postMessage(this.picArrs, "*")
+            let arr = this.picArrs.map(i => ({
+              key: i.Key,
+              name: i.Name,
+              type: i.Type
+            }))
+            iframe.contentWindow.postMessage(arr, "*")
           }
         })
       }

+ 15 - 11
src/components/ledger/lib/system.vue

@@ -2,7 +2,7 @@
   <div id="cascaderMap">
     <span class="buildFloor" style="padding-right: 12px;">所属专业系统类型</span>
     <el-select v-model="value" placeholder="请选择" :props="props" filterable :style="isWidth ? '' : 'width:160px;'" size="small" @change="changeVal">
-      <el-option  v-for="item in options" :key="item.Category" :label="item.CategoryName" :value="item.Category"></el-option>
+      <el-option v-for="item in options" :key="item.Category" :label="item.CategoryName" :value="item.Category"></el-option>
     </el-select>
     <!-- <el-cascader placeholder="请选择" :options="options" v-model="value" :props="props" filterable :style="isWidth ? '' : 'width:160px;'" size="small"
       @change="changeVal" change-on-select></el-cascader> -->
@@ -18,8 +18,8 @@ export default {
       type: Boolean,
       default: true
     },
-    all:{
-      default:false
+    all: {
+      default: false
     }
   },
   computed: {
@@ -36,20 +36,24 @@ export default {
     };
   },
   created() {
-    if(this.all){
-      //物理世界所有系统
-      this.getAllData();
-    }else{
-      //当前项目下已有的系统
-      this.getData();
-    }
+    this.init()
   },
   watch: {
     projectId() {
       this.value = ''
+      this.init()
     }
   },
   methods: {
+    init() {
+      if (this.all) {
+        //物理世界所有系统
+        this.getAllData();
+      } else {
+        //当前项目下已有的系统
+        this.getData();
+      }
+    },
     setValue(val) {
       this.value = val
     },
@@ -80,7 +84,7 @@ export default {
         }
       })
     },
-    getAllData(){
+    getAllData() {
       getEqCode().then(res => {
         this.options = this.changeArr(res.data.Content)
         if (this.value) {

+ 227 - 223
src/components/ledger/lib/uploadFiles.vue

@@ -8,241 +8,245 @@
   isShow: 图片的显示
  -->
 <template>
-    <div id="saga-upload">
-        <div id="uploadFile">
-
-            <el-upload
-                v-if="filesArr.length < max"
-                class="upload-file"
-                action
-                :show-file-list="showFileList"
-                :http-request="uploadAndSubmit"
-                drag
-            >
-
-                <el-button
-                    size="small"
-                    type="primary"
-                    v-if="!readOnly"
-                >点击上传
-                </el-button>
-                <div
-                    slot="tip"
-                    class="el-upload__tip"
-                    v-if="!readOnly"
-                >请上传文件
-                </div>
-            </el-upload>
-
-            <div
-                v-show="item && filesArr.length"
-                v-for="(item,index) in filesArr"
-            >
-                <el-button
-                    type="text"
-                    @click="download(item)"
-                >{{delFile(item)}}
-                </el-button>
-                <i
-                    v-if="!readOnly"
-                    class="el-icon-close delete-icon"
-                    style="margin-left:10px; cursor:pointer"
-                    @click="deleteFile(index,item)"
-                ></i>
-            </div>
+  <div id="saga-upload">
+    <div id="uploadFile">
+      <el-upload
+          class="upload-file"
+          action
+          :show-file-list="false"
+          :http-request="uploadAndSubmit"
+          drag
+      >
+        <el-button
+            size="small"
+            type="primary"
+            v-if="!readOnly "
+        >点击上传
+        </el-button>
+        <div
+            slot="tip"
+            class="el-upload__tip"
+            v-if="!readOnly"
+        >请上传文件
         </div>
+      </el-upload>
+
+      <div
+          v-show="item && filesArr.length"
+          v-for="(item,index) in filesArr"
+      >
+        <el-button
+            type="text"
+            @click="download(item.Key)"
+        >
+          {{delFile(item.Name)}}
+        </el-button>
+        <i
+            v-if="!readOnly"
+            class="el-icon-close delete-icon"
+            style="margin-left:10px; cursor:pointer"
+            @click="deleteFile(index,item)"
+        ></i>
+      </div>
+    </div>
   </div>
 </template>
 
 <script>
-    import tools from "@/utils/scan/tools";
-
-    export default {
-        props: {
-            keysArr: {
-                type: [Array, String],
-                default: function () {
-                    return []
-                }
-            },
-            readOnly: {
-                type: Boolean,
-                default: false
-            },
-            max: {
-                type: [Number, String],
-                default: 6
-            },
-            defined: null,
-            firmDataType: {
-                type: String
-            },
-            information: {
-                type: Object
-            },
-            infoType: {
-                type: String
-            }
-        },
-        data() {
-            return {
-                filesArr: [],
-                isShow: Boolean
-            };
-        },
-        created() {
-            let type = typeof (this.keysArr)
-            this.fileFalg()
-            // this.resetFile()
-        },
-        computed: {
-            showFileList() {
-                if (this.firmDataType === 'dialog') {
-                    this.isShow = false
+  import tools from "@/utils/scan/tools";
+
+  export default {
+    props: {
+      keysArr: {
+        type: [Array, String],
+        default: function () {
+          return []
+        }
+      },
+      readOnly: {
+        type: Boolean,
+        default: false
+      },
+      max: {
+        type: [Number, String],
+        default: 6
+      },
+      defined: null,
+      firmDataType: {
+        type: String
+      },
+      information: {
+        type: Object
+      },
+      infoType: {
+        type: String
+      }
+    },
+    data() {
+      return {
+        filesArr: [],
+        isShow: Boolean
+      };
+    },
+    created() {
+      this.fileFalg()
+      // this.resetFile()
+    },
+    computed: {
+      showFileList() {
+        if (this.firmDataType === 'dialog') {
+          this.isShow = false
+        } else {
+          this.isShow = true
+        }
+        return this.isShow
+      }
+    },
+    methods: {
+      //判断是否为空
+      fileFalg() {
+        let type = typeof (this.keysArr)
+        if (type == 'string') {
+          this.filesArr = [this.keysArr]
+        } else {
+          this.filesArr = tools.deepCopy(this.keysArr)
+        }
+        this.filesArr = tools.deepCopy(this.keysArr)
+        if (!this.keysArr) {
+          this.filesArr = []
+        }
+      },
+      //处理地址
+      delFile(name) {
+        return name.length > 20 ? name.substring(0, 20) + "..." : name
+      },
+
+      resetFile() {
+        this.filesArr = []
+      },
+
+
+      //点击下载
+      download(key) {
+        console.log(key)
+        window.open("/image-service/common/file_get/" + key + "?systemId=dataPlatform")
+      },
+
+      //删除图片
+      deleteFile(i, key) {
+        this.filesArr.splice(i, 1);
+        this.$emit("change", this.filesArr, this.defined);
+      },
+
+      //上传
+      uploadAndSubmit(item) {
+        // var form = document.forms["demoForm"];
+
+        // if (form["file"].files.length > 0) {
+        // 寻找表单域中的 <input type="file" ... /> 标签
+        // var file = form["file"].files[0];
+
+        let file = item.file;
+        // try sending
+        let reader = new FileReader();
+
+        let vm = this;
+
+        let fileType = file.name.split(".");
+        let type = fileType[fileType.length - 1];
+        let key = "&key=" + fileType[0] + file.uid + "." + type
+        let CreateTime = tools.formatDate(new Date(file.lastModified))
+        reader.onloadstart = function () {
+          // 这个事件在读取开始时触发
+        };
+        reader.onprogress = function (p) {
+          // 这个事件在读取进行中定时触发
+        };
+
+        reader.onload = function () {
+          // 这个事件在读取成功结束后触发
+        };
+        reader.onloadend = function () {
+          // 这个事件在读取结束后,无论成功或者失败都会触发
+          if (reader.error) {
+          } else {
+            // document.getElementById("bytesRead").textContent = file.size;
+            // 构造 XMLHttpRequest 对象,发送文件 Binary 数据
+            var xhr = new XMLHttpRequest();
+            xhr.open(
+              /* method */
+              "POST",
+              /* target url */
+              "/image-service/common/file_upload?systemId=dataPlatform&secret=9e0891a7a8c8e885&overwrite=true" + key
+              /*, async, default to true */
+            );
+            //xhr.overrideMimeType("application/octet-stream");
+            xhr.send(reader.result);
+            xhr.onreadystatechange = function () {
+              if (xhr.readyState == 4) {
+                console.log(xhr)
+                if (xhr.status == 200) {
+                  let fileObject = {
+                    Key: key.split("=")[1],
+                    Type: type,
+                    Name: file.name,
+                    CreateTime,
+                    SystemId: 'dataPlatform'
+                  }
+                  vm.filesArr.push(fileObject);
+                  vm.$emit("change", vm.filesArr, vm.defined);
                 } else {
-                    this.isShow = true
+                  this.$message.error(res.data.ResultMsg)
                 }
-                return this.isShow
-            }
-        },
-        methods: {
-            //判断是否为空
-            fileFalg() {
-                let type = typeof (this.keysArr)
-                if (type == 'string') {
-                    this.filesArr = [this.keysArr]
+              }
+            };
+          }
+        };
+        reader.readAsArrayBuffer(file);
+      }
+    },
+    watch: {
+      keysArr: function (val) {
+        this.fileFalg()
+      }
+    }
+  };
+</script>
 
-                } else {
-                    this.filesArr = tools.deepCopy(this.keysArr)
+<style lang="less">
+  #saga-upload {
+    .dill-image {
+      position: absolute;
+      right: 0;
+      top: 0;
+      font-size: 20px;
+    }
 
-                }
+    .el-upload-dragger {
+      width: 180px;
+      height: 180px;
+    }
 
-                if (!this.keysArr) {
-                    this.filesArr = []
-                }
-            },
-            //处理地址
-            delFile(name) {
-                return name.length > 20 ? name.substring(0, 20) + "..." : name
-            },
-
-            resetFile() {
-                this.filesArr = []
-            },
-
-
-            //点击下载
-            download(key) {
-                console.log(key)
-                window.open("/image-service/common/file_get/" + key + "?systemId=dataPlatform")
-            },
-
-            //删除图片
-            deleteFile(i, key) {
-                this.filesArr.splice(i, 1);
-                this.$emit("change", this.filesArr, this.defined);
-            },
-
-            //上传
-            uploadAndSubmit(item) {
-                // var form = document.forms["demoForm"];
-
-                // if (form["file"].files.length > 0) {
-                // 寻找表单域中的 <input type="file" ... /> 标签
-                // var file = form["file"].files[0];
-
-                let file = item.file;
-                // try sending
-                let reader = new FileReader();
-
-                let vm = this;
-
-                let fileType = file.name.split(".");
-                let type = fileType[fileType.length - 1];
-                let key = "&key=" + fileType[0] + file.uid + "." + type
-
-                reader.onloadstart = function () {
-                    // 这个事件在读取开始时触发
-                };
-                reader.onprogress = function (p) {
-                    // 这个事件在读取进行中定时触发
-                };
-
-                reader.onload = function () {
-                    // 这个事件在读取成功结束后触发
-                };
-                reader.onloadend = function () {
-                    // 这个事件在读取结束后,无论成功或者失败都会触发
-                    if (reader.error) {
-                    } else {
-                        // document.getElementById("bytesRead").textContent = file.size;
-                        // 构造 XMLHttpRequest 对象,发送文件 Binary 数据
-                        var xhr = new XMLHttpRequest();
-                        xhr.open(
-                            /* method */
-                            "POST",
-                            /* target url */
-                            "/image-service/common/file_upload?systemId=dataPlatform&secret=9e0891a7a8c8e885&overwrite=true" + key
-                            /*, async, default to true */
-                        );
-                        //xhr.overrideMimeType("application/octet-stream");
-                        xhr.send(reader.result);
-                        xhr.onreadystatechange = function () {
-                            if (xhr.readyState == 4) {
-                                console.log(xhr)
-                                if (xhr.status == 200) {
-                                    vm.filesArr.push(
-                                        key.split("=")[1]
-                                    );
-                                    vm.$emit("change", vm.filesArr, vm.defined);
-                                } else {
-                                    this.$message.error(res.data.ResultMsg)
-                                }
-                            }
-                        };
-                    }
-                };
-                reader.readAsArrayBuffer(file);
-            }
-        },
-        watch: {
-            keysArr: function (val) {
-                this.fileFalg()
-            }
-  }
-};
-</script>
+    img {
+      position: absolute;
+      top: 0;
+      bottom: 0;
+      left: 0;
+      right: 0;
+      width: 100%;
+      height: 100%;
+    }
 
-<style lang="less">
-#saga-upload {
-  .dill-image {
-    position: absolute;
-    right: 0px;
-    top: 0px;
-    font-size: 20px;
-  }
-  .el-upload-dragger {
-    width: 180px;
-    height: 180px;
-  }
-  img {
-    position: absolute;
-    top: 0;
-    bottom: 0;
-    left: 0;
-    right: 0;
-    width: 100%;
-    height: 100%;
-  }
-  #uploadFile {
-    .upload-file {
-      overflow: hidden;
-      .el-upload-dragger {
-        width: inherit;
-        height: inherit;
-        border: none;
+    #uploadFile {
+      .upload-file {
+        overflow: hidden;
+
+        .el-upload-dragger {
+          width: inherit;
+          height: inherit;
+          border: none;
+        }
       }
     }
   }
-}
 </style>

+ 296 - 279
src/components/ledger/lib/uploadImgs.vue

@@ -9,26 +9,27 @@
     <div class="saga-upload-images">
       <div v-if="type != 'video'" class="point-image" v-for="(item,index) in imagesArr">
         <i v-if="!readOnly" class="el-icon-delete" @click="delImage(index,item)"></i>
-        <img :src="imageGetUrl + '&key=' +item.key" @click="lookImg" alt v-load>
+        <img :src="imageGetUrl + '&key=' +item.Key" @click="lookImg" alt v-load>
       </div>
       <div v-if="type == 'video'" class="point-image" v-for="(item,index) in imagesArr">
         <i v-if="!readOnly" class="el-icon-delete" @click="delImage(index,item)"></i>
         <video
-          width="100%"
-          height="100%;"
-          :src="imageGetUrl + '&key=' +item.key"
-          controls="controls"
-        >您的浏览器不支持 video 标签。</video>
+            width="100%"
+            height="100%;"
+            :src="imageGetUrl + '&key=' +item.Key"
+            controls="controls"
+        >您的浏览器不支持 video 标签。
+        </video>
       </div>
-      <div v-if="!readOnly && imagesArr.length < max" style="float:left;">
+      <div v-if="!readOnly" style="float:left;">
         <el-upload
-          class="avatar-uploader"
-          :http-request="uploadAndSubmit"
-          :show-file-list="false"
-          :accept="accept"
-          action
-          drag
-          style="position: relation"
+            class="avatar-uploader"
+            :http-request="uploadAndSubmit"
+            :show-file-list="false"
+            :accept="accept"
+            action
+            drag
+            style="position: relative"
         >
           <i class="el-icon-plus avatar-uploader-icon"></i>
         </el-upload>
@@ -39,301 +40,317 @@
   </div>
 </template>
 <script>
-import tools from "@/utils/scan/tools";
-import detailsDialog from "@/components/business_space/lib/detailsDia"
-export default {
-  components: {
-    detailsDialog
-  },
-  props: {
-    keysArr: {
-      type: [Array, String]
-    },
-    readOnly: {
-      type: Boolean,
-      default: false
-    },
-    max: {
-      type: [Number, String],
-      default: 6
-    },
-    accept: {
-      type: String,
-      default: "image/*"
-    },
-    type: {
-      type: String,
-      default: "image"
-    },
-    defined: null,
-    videoPicArr: {
-      type: Array,
-      default: function () {
-        return []
-      }
-    }
-  },
-  data() {
-    return {
-      baseUrl: "",
-      imageGetUrl: "/image-service/common/image_get?systemId=dataPlatform",
-      imageUploadUrl: "/image-service/common/image_upload?systemId=dataPlatform&secret=9e0891a7a8c8e885&overwrite=true",
-      imagesArr: [],
-      iframeSrc: "",
-      dialog: {
-        details: false
-      }
-    };
-  },
-  created() {
-    this.imageFalg();
-  },
-  methods: {
-    //判断是否为空
-    imageFalg() {
-      let type = typeof this.keysArr;
-      console.log(this.keysArr)
-      if (type == "string") {
-        this.imagesArr = [this.keysArr];
-      } else {
-        this.imagesArr = tools.deepCopy(this.keysArr);
-      }
+  import tools from "@/utils/scan/tools";
+  import detailsDialog from "@/components/business_space/lib/detailsDia"
 
-      if (!this.keysArr) {
-        this.imagesArr = [];
+  export default {
+    components: {
+      detailsDialog
+    },
+    props: {
+      keysArr: {
+        type: [Array, String]
+      },
+      readOnly: {
+        type: Boolean,
+        default: false
+      },
+      max: {
+        type: [Number, String],
+        default: 6
+      },
+      accept: {
+        type: String,
+        default: "image/*"
+      },
+      type: {
+        type: String,
+        default: "image"
+      },
+      defined: null,
+      videoPicArr: {
+        type: Array,
+        default: function () {
+          return []
+        }
       }
     },
-    //查看图片
-    lookImg() {
-      this.dialog.details = true
-      this.iframeSrc = process.env.BASE_URL + ":8890/photo-View.html"
+    data() {
+      return {
+        baseUrl: "",
+        imageGetUrl: "/image-service/common/image_get?systemId=dataPlatform",
+        imageUploadUrl: "/image-service/common/image_upload?systemId=dataPlatform&secret=9e0891a7a8c8e885&overwrite=true",
+        imagesArr: [],
+        iframeSrc: "",
+        dialog: {
+          details: false
+        }
+      };
     },
-    //删除图片
-    delImage(i, key) {
-      if (this.type == "video") {
-        this.videoPicArr = this.videoPicArr.map(item => {
-          if (item.substring(0, item.length - 3) == this.imagesArr[i].substring(0, this.imagesArr[i].length - 3)) {
-            return undefined
-          } else {
-            return item
-          }
-        }).filter(p => p)
-      }
-      this.imagesArr.splice(i, 1);
-      this.$emit("change", this.imagesArr, this.defined, this.videoPicArr);
+    created() {
+      this.imageFalg();
     },
+    methods: {
+      //判断是否为空
+      imageFalg() {
+        let type = typeof this.keysArr;
+        if (type == "string") {
+          this.imagesArr = [this.keysArr];
+        } else {
+          this.imagesArr = tools.deepCopy(this.keysArr);
+        }
 
-    //上传
-    uploadAndSubmit(item, key) {
-      // var form = document.forms["demoForm"];
+        if (!this.keysArr) {
+          this.imagesArr = [];
+        }
+      },
+      //查看图片
+      lookImg() {
+        this.dialog.details = true
+        this.iframeSrc = process.env.BASE_URL + ":8890/photo-View.html"
+      },
+      //删除图片
+      delImage(i, key) {
+        if (this.type == "video") {
+          this.videoPicArr = this.videoPicArr.map(item => {
+            if (item.substring(0, item.length - 3) == this.imagesArr[i].substring(0, this.imagesArr[i].length - 3)) {
+              return undefined
+            } else {
+              return item
+            }
+          }).filter(p => p)
+        }
+        this.imagesArr.splice(i, 1);
+        this.$emit("change", this.imagesArr, this.defined, this.videoPicArr);
+      },
 
-      // if (form["file"].files.length > 0) {
-      // 寻找表单域中的 <input type="file" ... /> 标签
-      // var file = form["file"].files[0];
+      //上传
+      uploadAndSubmit(item, key) {
+        // var form = document.forms["demoForm"];
 
-      let file = item.file;
-      // try sending
-      let reader = new FileReader();
+        // if (form["file"].files.length > 0) {
+        // 寻找表单域中的 <input type="file" ... /> 标签
+        // var file = form["file"].files[0];
 
-      let vm = this;
+        let file = item.file;
+        // try sending
+        let reader = new FileReader();
 
-      let fileType = file.name.split(".");
-      let type = fileType[fileType.length - 1];
+        let vm = this;
 
-      let uploadKey = file.uid
-      if (!!key) {
-        uploadKey = key
-      }
+        let fileType = file.name.split(".");
+        let type = fileType[fileType.length - 1];
+        let CreateTime = tools.formatDate(new Date(file.lastModified))
 
-      reader.onloadstart = function () {
-        // 这个事件在读取开始时触发
-      };
-      reader.onprogress = function (p) {
-        // 这个事件在读取进行中定时触发
-      };
+        let uploadKey = file.uid
+        if (!!key) {
+          uploadKey = key
+        }
 
-      reader.onload = function () {
-        // 这个事件在读取成功结束后触发
-      };
-      reader.onloadend = function () {
-        // 这个事件在读取结束后,无论成功或者失败都会触发
-        if (reader.error) {
-        } else {
-          // document.getElementById("bytesRead").textContent = file.size;
-          // 构造 XMLHttpRequest 对象,发送文件 Binary 数据
-          var xhr = new XMLHttpRequest();
-          xhr.open(
-            /* method */
-            "POST",
-            /* target url */
-            vm.imageUploadUrl + "&key=" + uploadKey + "." + type
-            /*, async, default to true */
-          );
-          //xhr.overrideMimeType("application/octet-stream");
-          xhr.send(reader.result);
-          xhr.onreadystatechange = function () {
-            if (xhr.readyState == 4) {
-              if (xhr.status == 200) {
-                if (vm.type == 'image') {
-                  vm.imagesArr.push({
-                    name: uploadKey + '',
-                    key: uploadKey + "." + type,
-                    systemId: "dataPlatform",
-                    type: "image"
-                  });
-                }
-                if (type == 'mp4') {
-                  vm.imagesArr.push({
-                    name: uploadKey + '',
-                    key: uploadKey + "." + type,
-                    systemId: "dataPlatform",
-                    type: "video"
-                  });
-                  vm.creatImg(vm.imageGetUrl + "&key=" + uploadKey + "." + type, uploadKey)
-                }
-                console.log(vm.type, type)
-                if (vm.type == "video" && type == "png") {
-                  console.log("触发时评上传图片回调")
-                  vm.videoPicArr.push(uploadKey + "." + type)
+        reader.onloadstart = function () {
+          // 这个事件在读取开始时触发
+        };
+        reader.onprogress = function (p) {
+          // 这个事件在读取进行中定时触发
+        };
+
+        reader.onload = function () {
+          // 这个事件在读取成功结束后触发
+        };
+        reader.onloadend = function () {
+          // 这个事件在读取结束后,无论成功或者失败都会触发
+          if (reader.error) {
+          } else {
+            // document.getElementById("bytesRead").textContent = file.size;
+            // 构造 XMLHttpRequest 对象,发送文件 Binary 数据
+            var xhr = new XMLHttpRequest();
+            xhr.open(
+              /* method */
+              "POST",
+              /* target url */
+              vm.imageUploadUrl + "&key=" + uploadKey + "." + type
+              /*, async, default to true */
+            );
+            //xhr.overrideMimeType("application/octet-stream");
+            xhr.send(reader.result);
+            xhr.onreadystatechange = function () {
+              if (xhr.readyState == 4) {
+                if (xhr.status == 200) {
+                  if (vm.type == 'image') {
+                    vm.imagesArr.push({
+                      Name: uploadKey + '',
+                      Key: uploadKey + "." + type,
+                      SystemId: "dataPlatform",
+                      Type: "image",
+                      CreateTime
+                    });
+                  }
+                  if (type == 'mp4') {
+                    vm.imagesArr.push({
+                      Name: uploadKey + '',
+                      Key: uploadKey + "." + type,
+                      SystemId: "dataPlatform",
+                      Type: "video",
+                      CreateTime
+                    });
+                    vm.creatImg(vm.imageGetUrl + "&key=" + uploadKey + "." + type, uploadKey)
+                  }
+                  console.log(vm.type, type)
+                  if (vm.type == "video" && type == "png") {
+                    console.log("触发时评上传图片回调")
+                    vm.videoPicArr.push({
+                      Name: uploadKey + '',
+                      Key: uploadKey + "." + type,
+                      SystemId: "dataPlatform",
+                      Type: "image_video",
+                      CreateTime
+                    })
+                  }
+                  vm.$emit("change", vm.imagesArr, vm.defined, vm.videoPicArr);
                 }
-                vm.$emit("change", vm.imagesArr, vm.defined, vm.videoPicArr);
               }
-            }
-          };
+            };
+          }
+        };
+        reader.readAsArrayBuffer(file);
+      },
+      dataURLtoBlob: function (dataURI, type) {
+        var binary = atob(dataURI.split(',')[1]);
+        var array = [];
+        for (var i = 0; i < binary.length; i++) {
+          array.push(binary.charCodeAt(i));
         }
-      };
-      reader.readAsArrayBuffer(file);
-    },
-    dataURLtoBlob: function (dataURI, type) {
-      var binary = atob(dataURI.split(',')[1]);
-      var array = [];
-      for (var i = 0; i < binary.length; i++) {
-        array.push(binary.charCodeAt(i));
-      }
-      return new Blob([new Uint8Array(array)], { type: type });
-    },
+        return new Blob([new Uint8Array(array)], {type: type});
+      },
 
-    creatImg(reader, key) {
-      var videoDom = document.getElementById('video');
-      videoDom.src = reader;
-      let vm = this
-      videoDom.onloadeddata = function () {
-        // 这里可以打印视频时长
-        // 这里取得视频封面
-        var canvas = document.createElement('canvas');
-        canvas.width = 300;
-        canvas.height = 300 * this.videoHeight / this.videoWidth;
-        canvas.getContext('2d').drawImage(this, 0, 0, canvas.width, canvas.height);
-        //将canvas的base64位图片转换成图片png的file
-        var blob = vm.dataURLtoBlob(canvas.toDataURL('image/png'), "image/png")
-        //将其转换成file对象
-        var file = new File([blob], "video_image.png", { type: "image/png", lastModified: Date.now() })//blob转file
-        vm.uploadAndSubmit({ file: file }, key)
+      creatImg(reader, key) {
+        var videoDom = document.getElementById('video');
+        videoDom.src = reader;
+        let vm = this
+        videoDom.onloadeddata = function () {
+          // 这里可以打印视频时长
+          // 这里取得视频封面
+          var canvas = document.createElement('canvas');
+          canvas.width = 300;
+          canvas.height = 300 * this.videoHeight / this.videoWidth;
+          canvas.getContext('2d').drawImage(this, 0, 0, canvas.width, canvas.height);
+          //将canvas的base64位图片转换成图片png的file
+          var blob = vm.dataURLtoBlob(canvas.toDataURL('image/png'), "image/png")
+          //将其转换成file对象
+          var file = new File([blob], "video_image.png", {type: "image/png", lastModified: Date.now()})//blob转file
+          vm.uploadAndSubmit({file: file}, key)
+        }
+      },
+    },
+    watch: {
+      keysArr: function (val) {
+        this.imageFalg();
       }
     },
-  },
-  watch: {
-    keysArr: function (val) {
-      this.imageFalg();
-    }
-  },
-  //自定义指令
-  directives: {
-    load: function (el) {
-      let imgDom = document.createElement("img");
-      imgDom.style.position = "absolute";
-      imgDom.style.top = "-999px";
-      imgDom.style.opacity = 0;
-      imgDom.src = el.src;
-      el.src = "";
-      imgDom.onload = () => {
-        let width = imgDom.width;
-        let height = imgDom.height;
-        if (width > height) {
-          el.style.height = "100%";
-          el.style.width = "auto";
-          el.style.position = "absolute";
-          el.style.left = "50%";
-          el.style.top = "0";
-          el.style.transform = "translateX(-50%)";
-          el.style.webkitTransform = "translateX(-50%) translateY(0)";
-          el.style.MozTransform = "translateX(-50%) translateY(0)";
-          el.style.msTransform = "translateX(-50%) translateY(0)";
-          el.style.OTransform = "translateX(-50%) translateY(0)";
-        } else if (width < height) {
+    //自定义指令
+    directives: {
+      load: function (el) {
+        let imgDom = document.createElement("img");
+        imgDom.style.position = "absolute";
+        imgDom.style.top = "-999px";
+        imgDom.style.opacity = 0;
+        imgDom.src = el.src;
+        el.src = "";
+        imgDom.onload = () => {
+          let width = imgDom.width;
+          let height = imgDom.height;
+          if (width > height) {
+            el.style.height = "100%";
+            el.style.width = "auto";
+            el.style.position = "absolute";
+            el.style.left = "50%";
+            el.style.top = "0";
+            el.style.transform = "translateX(-50%)";
+            el.style.webkitTransform = "translateX(-50%) translateY(0)";
+            el.style.MozTransform = "translateX(-50%) translateY(0)";
+            el.style.msTransform = "translateX(-50%) translateY(0)";
+            el.style.OTransform = "translateX(-50%) translateY(0)";
+          } else if (width < height) {
+            el.src = imgDom.src;
+            el.style.width = "100%";
+            el.style.height = "auto";
+            el.style.position = "absolute";
+            el.style.top = "50%";
+            el.style.left = "0";
+            el.style.transform = "translateY(-50%) translateX(0)";
+            el.style.webkitTransform = "translateY(-50%) translateX(0)";
+            el.style.MozTransform = "translateY(-50%) translateX(0)";
+            el.style.msTransform = "translateY(-50%) translateX(0)";
+            el.style.OTransform = "translateY(-50%) translateX(0)";
+          } else {
+            el.style.width = "100%";
+            el.style.height = "100%";
+            el.style.position = "absolute";
+            el.style.top = "0";
+            el.style.left = "0";
+            el.style.transform = "translateY(0) translateX(0)";
+            el.style.webkitTransform = "translateY(0) translateX(0)";
+            el.style.MozTransform = "translateY(0) translateX(0)";
+            el.style.msTransform = "translateY(0) translateX(0)";
+            el.style.OTransform = "translateY(0) translateX(0)";
+          }
           el.src = imgDom.src;
-          el.style.width = "100%";
-          el.style.height = "auto";
-          el.style.position = "absolute";
-          el.style.top = "50%";
-          el.style.left = "0";
-          el.style.transform = "translateY(-50%) translateX(0)";
-          el.style.webkitTransform = "translateY(-50%) translateX(0)";
-          el.style.MozTransform = "translateY(-50%) translateX(0)";
-          el.style.msTransform = "translateY(-50%) translateX(0)";
-          el.style.OTransform = "translateY(-50%) translateX(0)";
-        } else {
-          el.style.width = "100%";
-          el.style.height = "100%";
-          el.style.position = "absolute";
-          el.style.top = "0";
-          el.style.left = "0";
-          el.style.transform = "translateY(0) translateX(0)";
-          el.style.webkitTransform = "translateY(0) translateX(0)";
-          el.style.MozTransform = "translateY(0) translateX(0)";
-          el.style.msTransform = "translateY(0) translateX(0)";
-          el.style.OTransform = "translateY(0) translateX(0)";
-        }
-        el.src = imgDom.src;
-      };
+        };
+      }
     }
-  }
-};
+  };
 </script>
 <style lang="less">
-#sagaUploads {
-  overflow: hidden;
-  .avatar-uploader {
-    height: 180px;
-    width: 180px;
+  #sagaUploads {
     overflow: hidden;
-    .el-upload {
-      width: 180px;
+
+    .avatar-uploader {
       height: 180px;
-      .el-upload-dragger {
+      width: 180px;
+      overflow: hidden;
+
+      .el-upload {
         width: 180px;
         height: 180px;
-        .el-icon-plus {
-          display: block;
-          width: 20px;
-          height: 20px;
-          font-size: 20px;
-          margin: 80px;
+
+        .el-upload-dragger {
+          width: 180px;
+          height: 180px;
+
+          .el-icon-plus {
+            display: block;
+            width: 20px;
+            height: 20px;
+            font-size: 20px;
+            margin: 80px;
+          }
         }
       }
     }
-  }
-  .point-image {
-    width: 180px;
-    height: 180px;
-    float: left;
-    position: relative;
-    margin-right: 10px;
-    margin-bottom: 10px;
-    border: 1px solid #ccc;
-    overflow: hidden;
-    image {
-      z-index: 11;
-    }
-    i {
-      position: absolute;
-      bottom: 10px;
-      right: 10px;
-      background-color: #fff;
-      padding: 5px;
-      cursor: pointer;
-      z-index: 66;
+
+    .point-image {
+      width: 180px;
+      height: 180px;
+      float: left;
+      position: relative;
+      margin-right: 10px;
+      margin-bottom: 10px;
+      border: 1px solid #ccc;
+      overflow: hidden;
+
+      image {
+        z-index: 11;
+      }
+
+      i {
+        position: absolute;
+        bottom: 10px;
+        right: 10px;
+        background-color: #fff;
+        padding: 5px;
+        cursor: pointer;
+        z-index: 66;
+      }
     }
   }
-}
 </style>

+ 27 - 23
src/components/ledger/lib/uploadImgsName.vue

@@ -10,9 +10,9 @@
       <div v-if="type != 'video'" class="point-view" v-for="(item,index) in imagesArr">
         <div class="point-image">
           <i v-if="!readOnly" class="el-icon-delete" @click="delImage(index,item)"></i>
-          <img @click="lookImg" :src="imageGetUrl + '&key=' +item.key" alt v-load>
+          <img @click="lookImg" :src="imageGetUrl + '&key=' +item.Key" alt v-load>
         </div>
-        <form-input :label="''" @change="getName" :keys="index" :value="item.name" :width="10"></form-input>
+        <form-input :label="''" @change="getName" :keys="index" :value="item.Name" :width="10"></form-input>
       </div>
       <div v-if="type == 'video'" class="point-view" v-for="(item,index) in imagesArr">
         <div class="point-image">
@@ -20,13 +20,14 @@
           <video
             width="100%"
             height="100%;"
-            :src="imageGetUrl + '&key=' +item.key"
+            :src="imageGetUrl + '&key=' +item.Key"
             controls="controls"
           >您的浏览器不支持 video 标签。</video>
         </div>
-        <form-input :label="''" @change="getName" :keys="index" :value="item.name" :width="10"></form-input>
+        <form-input :label="''" @change="getName" :keys="index" :value="item.Name" :width="10"></form-input>
       </div>
-      <div v-if="!readOnly && imagesArr.length < max" style="float:left;">
+      <!--      v-if="!readOnly && imagesArr.length < max"-->
+      <div style="float:left;">
         <el-upload
           class="avatar-uploader"
           :http-request="uploadAndSubmit"
@@ -45,11 +46,11 @@
   </div>
 </template>
 <script>
-import tools from "@/utils/scan/tools";
-import formInput from "@/components/business_space/lib/formInput"
-import detailsDialog from "@/components/business_space/lib/detailsDia"
+  import tools from "@/utils/scan/tools";
+  import formInput from "@/components/business_space/lib/formInput"
+  import detailsDialog from "@/components/business_space/lib/detailsDia"
 
-export default {
+  export default {
   components: {
     formInput,
     detailsDialog
@@ -99,8 +100,7 @@ export default {
   },
   methods: {
     getName(name, index) {
-      console.log(this.imagesArr, "imagesArr")
-      this.imagesArr[index].name = name
+      this.imagesArr[index].Name = name
       this.$emit("change", this.imagesArr, this.defined, this.videoPicArr);
     },
     //判断是否为空
@@ -154,6 +154,7 @@ export default {
 
       let fileType = file.name.split(".");
       let type = fileType[fileType.length - 1];
+      let CreateTime = tools.formatDate(new Date(file.lastModified))
 
       let uploadKey = file.uid
       if (!!key) {
@@ -192,29 +193,32 @@ export default {
                 if (vm.type == 'image') {
                   vm.imagesArr.push(
                     {
-                      name: uploadKey + '',
-                      key: uploadKey + "." + type,
-                      systemId: "dataPlatform",
-                      type: "image"
+                      Name: uploadKey + '',
+                      Key: uploadKey + "." + type,
+                      SystemId: "dataPlatform",
+                      Type: "image",
+                      CreateTime
                     }
                   );
                 }
                 if (type == 'mp4') {
                   vm.imagesArr.push({
-                    name: uploadKey + '',
-                    key: uploadKey + "." + type,
-                    systemId: "dataPlatform",
-                    type: "video"
+                      Name: uploadKey + '',
+                      Key: uploadKey + "." + type,
+                      SystemId: "dataPlatform",
+                      Type: "video",
+                      CreateTime
                   }
                   );
                   vm.creatImg(vm.imageGetUrl + "&key=" + uploadKey + "." + type, uploadKey)
                 }
                 if (vm.type == "video" && type == "png") {
                   vm.videoPicArr.push({
-                    name: uploadKey + '',
-                    key: uploadKey + "." + type,
-                    systemId: "dataPlatform",
-                    type: "image_video"
+                    Name: uploadKey + '',
+                    Key: uploadKey + "." + type,
+                    SystemId: "dataPlatform",
+                    Type: "image_video",
+                    CreateTime
                   })
                 }
                 vm.$emit("change", vm.imagesArr, vm.defined, vm.videoPicArr);

+ 336 - 0
src/components/ledger/rentList/roomCountDrawer.vue

@@ -0,0 +1,336 @@
+<template>
+  <el-drawer title="关联的业务空间" :visible.sync="drawer" :direction="direction" :before-close="handleClose" size="20%" custom-class="room-count">
+    <div class="drawer-body" :style="{height:drawerBodyHeight}">
+      <div class="default-zone zone">
+        <p>默认业务空间</p>
+        <div v-if="!(readonly&&!zoneList.GeneralZone.length)">
+          <div v-for="(item,index) in zoneList.GeneralZone" :key="item.RoomID" class="zoneItem"
+            :title="`${item.BuildLocalName}-${item.FloorLocalName}-${item.RoomLocalName || item.RoomName}`">
+            {{item.BuildLocalName}}-{{item.FloorLocalName}}-{{item.RoomLocalName || item.RoomName}}
+            <i size="mini" class="el-icon-delete" title="删除" @click="deleteZoneItem('GeneralZone',index)" v-if="!readonly"></i>
+          </div>
+          <div class="zoneItem" style="border:none;padding:0;" v-if="!readonly">
+            <el-cascader placeholder="请选择" v-model="GeneralVal" :options="option.GeneralZone" :props="props" filterable @expand-change="expandChange"
+              @change="change" style="width:100%;">
+            </el-cascader>
+          </div>
+        </div>
+        <div v-else class="center">
+          <i class="icon-wushuju iconfont"></i>
+          暂无数据
+        </div>
+      </div>
+      <div class="tenant-zone zone">
+        <p>租户业务空间</p>
+        <div v-if="!(readonly&&!zoneList.TenantZone.length)">
+          <div v-for="(item,index) in zoneList.TenantZone" :key="item.RoomID" class="zoneItem"
+            :title="`${item.BuildLocalName}-${item.FloorLocalName}-${item.RoomLocalName || item.RoomName}`">
+            {{item.BuildLocalName}}-{{item.FloorLocalName}}-{{item.RoomLocalName || item.RoomName}}
+            <i size="mini" class="el-icon-delete" title="删除" @click="deleteZoneItem('TenantZone',index)" v-if="!readonly"></i>
+          </div>
+          <div class="zoneItem" style="border:none;padding:0;" v-if="!readonly">
+            <el-cascader placeholder="请选择" v-model="TenantVal" :options="option.TenantZone" :props="props" filterable
+              @expand-change="expandChangeTenantZone" @change="changeTenantZone" style="width:100%;">
+            </el-cascader>
+          </div>
+        </div>
+        <div v-else class="center">
+          <i class="icon-wushuju iconfont"></i>
+          暂无数据
+        </div>
+      </div>
+    </div>
+    <div class="btn" v-if="!readonly">
+      <el-button type="primary" @click="save">保存</el-button>
+    </div>
+  </el-drawer>
+</template>
+<script>
+import {
+  tnRelateTenantZone, //关联租户空间
+  tnRelateGeneralZone, //关联默认空间
+  tnRelateOneZone,// 关联业务空间
+  delTnRelateZone, // 删除关系业务空间与租户
+  buildingQuery, //建筑查询
+  queryParentZone, //业务空间查询GeneralZone-TenantZone
+} from '@/api/scan/request'
+import { mapGetters } from "vuex";
+export default {
+  data() {
+    return {
+      drawer: false,
+      direction: 'rtl',
+      zoneList: {
+        GeneralZone: [],
+        TenantZone: []
+      },
+      option: {
+        GeneralZone: [],
+        TenantZone: []
+      },
+      props: {
+        children: 'Floor'
+      },
+      GeneralVal: [],
+      TenantVal: [],
+      curTenantId: '',
+      drawerBodyHeight: ''
+    }
+  },
+  props: {
+    readonly: {
+      default: true
+    }
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  watch: {
+    projectId() {
+      this.init();
+    }
+  },
+  mounted() {
+    this.drawerBodyHeight = document.body.clientHeight - 152 + 'px'
+  },
+  created() {
+    this.init();
+  },
+  methods: {
+    init() {
+      this.getBuilding()
+    },
+    getBuilding() {
+      let pa = {
+        Cascade: [{ Name: 'floor', Orders: 'FloorSequenceID desc' }],
+        Order: 'BuildLocalName asc'
+      }
+      buildingQuery(pa, res => {
+        this.option.GeneralZone = res.Content.map(build => {
+          build.value = build.BuildID;
+          build.label = build.BuildLocalName;
+          build.Floor = build.Floor.map(floor => {
+            floor.value = floor.FloorID;
+            floor.label = floor.FloorLocalName;
+            floor.Floor = [];
+            return floor;
+          });
+          build.Floor.unshift({ value: 'noknowFloor', label: '未明确楼层', Floor: [] })
+          return build;
+        })
+        this.option.GeneralZone.unshift({ value: 'noknowBuild', label: '未明确建筑', Floor: [] });
+        this.option.TenantZone = JSON.parse(JSON.stringify(this.option.GeneralZone));
+      })
+    },
+    expandChange(val) {
+      this.middleware(val, "GeneralZone")
+    },
+    expandChangeTenantZone(val) {
+      this.middleware(val, "TenantZone")
+    },
+    middleware(val, type) {
+      let filters = '';
+      if (val[0] == 'noknowBuild') { //未明确建筑
+        filters = `buildingId isNull`
+        this.getZone(filters, type, val)
+      } else if (val[1]) {
+        if (val[1] == "noknowFloor") {
+          filters = `buildingId='${val[0]}';floorId isNull`
+        } else {
+          filters = `buildingId='${val[0]}';floorId='${val[1]}'`
+        }
+        this.getZone(filters, type, val)
+      }
+    },
+    getZone(filters, type, selected) {
+      if (!filters) return;
+      let params = {
+        Cascade: [{ Name: 'building' }, { Name: 'floor' }],
+        Filters: `${filters};ObjectType='${type}'`,
+        Orders: "RoomID asc",
+        PageSize: 1000,
+        Projection: ["RoomID", "RoomLocalName", "RoomName", "ObjectType", "BuildingId", "FloorId"]
+      }
+      queryParentZone(params, res => {
+        if (res.Content.length) {
+          let tempArr = res.Content.map(t => {
+            t.BuildLocalName = t.Building ? t.Building.BuildLocalName : '未明确建筑';
+            t.FloorLocalName = t.Floor ? t.Floor.FloorLocalName : '未明确楼层';
+            delete t.Floor;
+            t.value = JSON.parse(JSON.stringify(t));
+            t.label = t.RoomLocalName || t.RoomName;
+            return t;
+          })
+          if (selected.length == 1) {
+            this.option[type][0].Floor = tempArr;
+          } else {
+            for (let i = 0; i < this.option[type].length; i++) {
+              if (this.option[type][i].value == selected[0]) {
+                for (let j = 0; j < this.option[type][i].Floor.length; j++) {
+                  if (this.option[type][i].Floor[j].value == selected[1]) {
+                    this.option[type][i].Floor[j].Floor = tempArr;
+                  }
+                }
+              }
+            }
+          }
+        }
+      })
+    },
+    change(val) {
+      let zoneObj = val[val.length - 1];
+      if (zoneObj.BuildLocalName == '未明确建筑') {
+        zoneObj.FloorLocalName = ''
+      }
+      if (this.zoneList.GeneralZone.findIndex((item) => (item.RoomID == zoneObj.RoomID)) == -1) {
+        this.zoneList.GeneralZone.push(zoneObj);
+        this.relateGeneral('GeneralZone', zoneObj.RoomID)
+      } else {
+        this.$message.warning('已有业务空间,请重新选择')
+      }
+      this.GeneralVal = [];
+    },
+    changeTenantZone(val) {
+      let zoneObj = val[val.length - 1];
+      if (zoneObj.BuildLocalName == '未明确建筑') {
+        zoneObj.FloorLocalName = ''
+      }
+      if (this.zoneList.TenantZone.findIndex((item) => (item.RoomID == zoneObj.RoomID)) == -1) {
+        this.zoneList.TenantZone.push(zoneObj);
+        this.relateGeneral('TenantZone', zoneObj.RoomID)
+      } else {
+        this.$message.warning('已有业务空间,请重新选择')
+      }
+      this.TenantVal = [];
+    },
+    showDrawer(tenant) {
+      this.curTenantId = tenant.TenantID;
+      if (tenant.ZoneGeneraltList) {
+        this.zoneList.GeneralZone = tenant.ZoneGeneraltList.map(t => {
+          if (t.Building) {
+            t.BuildLocalName = t.Building.BuildLocalName || t.Building.BuildName;
+          } else {
+            t.BuildLocalName = '未明确建筑'
+          }
+          if (t.Floor) {
+            t.FloorLocalName = t.Floor.FloorLocalName || t.Floor.FloorName;
+          } else {
+            t.FloorLocalName = '未明确楼层'
+          }
+          if (t.BuildLocalName == '未明确建筑') {
+            t.FloorLocalName = ''
+          }
+          return t;
+        });
+      } else {
+        this.zoneList.GeneralZone = [];
+      }
+      if (tenant.ZoneTenantList) {
+        this.zoneList.TenantZone = tenant.ZoneTenantList.map(t => {
+          if (t.Building) {
+            t.BuildLocalName = t.Building.BuildLocalName || t.Building.BuildName;
+          } else {
+            t.BuildLocalName = '未明确建筑'
+          }
+          if (t.Floor) {
+            t.FloorLocalName = t.Floor.FloorLocalName || t.Floor.FloorName;
+          } else {
+            t.FloorLocalName = '未明确楼层'
+          }
+          if (t.BuildLocalName == '未明确建筑') {
+            t.FloorLocalName = ''
+          }
+          return t;
+        });
+      } else {
+        this.zoneList.TenantZone = [];
+      }
+      this.drawer = true;
+    },
+    handleClose(done) {
+      this.zoneList.GeneralZone = [];
+      this.zoneList.GeneralZone = [];
+      this.$emit('refresh');
+      done();
+    },
+    // 删除
+    deleteZoneItem(type, index) {
+      let pa = {
+        type: type,
+        data: [
+          {
+            SpaceID: this.zoneList[type][index].RoomID,
+            TenantID: this.curTenantId
+          }
+        ]
+      }
+      this.zoneList[type].splice(index, 1);
+      delTnRelateZone(pa, res => { })
+    },
+    // 关联默认空间
+    relateGeneral(type, SpaceId) {
+      let pa = {
+        type: type,
+        data: {
+          Content: [
+            {
+              SpaceId: SpaceId,
+              TenantID: this.curTenantId
+            }
+          ]
+        }
+      }
+      tnRelateOneZone(pa, res => { })
+    },
+    save() {
+      this.$emit('refresh');
+      this.drawer = false;
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+.room-count {
+  .drawer-body {
+    position: relative;
+    padding: 10px 10px 30px;
+    overflow-y: auto;
+    .zone {
+      padding: 6px 14px 22px;
+      box-shadow: 0 0 3px #cacaca;
+      p {
+        margin-bottom: 4px;
+      }
+      .zoneItem {
+        position: relative;
+        padding: 2px 34px 2px 10px;
+        border: 1px solid #ccc;
+        border-radius: 4px;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        i {
+          position: absolute;
+          right: 10px;
+          top: 50%;
+          transform: translateY(-50%);
+          cursor: pointer;
+        }
+      }
+      .zoneItem + .zoneItem {
+        margin-top: 6px;
+      }
+    }
+    .zone + .zone {
+      margin-top: 10px;
+    }
+  }
+  .btn {
+    position: absolute;
+    width: calc(100% - 20px);
+    bottom: 20px;
+    right: 20px;
+    text-align: right;
+  }
+}
+</style>

+ 82 - 0
src/components/ledger/report/datafan.vue

@@ -0,0 +1,82 @@
+<template>
+  <div class="saga-fill">
+    <div class="mess-view">
+      <el-tooltip class="item" effect="dark" :content="renderData.tips" placement="bottom-start">
+        <i class="el-icon-info"><span>{{renderData.title}}</span></i>
+      </el-tooltip>
+    </div>
+    <div class="doughnut-view">
+      <fan-chart v-if="renderData.needCountO" type="type" width="200" height="200" :name="renderData.title" :renderData="renderData.needCountO" :id="id">
+      </fan-chart>
+    </div>
+    <slot></slot>
+  </div>
+</template>
+
+<script>
+import fanChart from "@/components/echarts/fanChart"
+export default {
+  data() {
+    return {
+      echartsData: [],
+      color: ["#AB7948", "#CAA679", "#DEC9A8", "#B3CFC4", "#7DAAA7", "#7484A6", "#9DABCB"]
+    }
+  },
+  created() {
+    this.echartsData = this.renderData.needCountO;
+    // this.echartsData.forEach((item, index) => {
+    //   item.itemStyle = {
+    //     color: this.color[index]
+    //   }
+    // })
+  },
+  components: {
+    fanChart
+  },
+  methods: {
+  },
+  props: {
+    id: {
+      type: String,
+      default: function createRandomId() {
+        return (Math.random() * 10000000).toString(16).substr(0, 4) + '-' + (new Date()).getTime() + '-' + Math.random().toString().substr(2, 5);
+      }
+    },
+    renderData: {
+      type: Object,
+      default: function () {
+        return {}
+      }
+    }
+  },
+}
+</script>
+
+<style lang="less" scoped>
+.mess-view {
+  box-sizing: border-box;
+  border-bottom: 1px solid #ddd;
+  padding: 10px 20px 10px 15px;
+  .saga-title {
+    font-size: 14px;
+    color: #333;
+    font-weight: 600;
+    line-height: 14px;
+  }
+  i {
+    span {
+      padding-left: 6px;
+    }
+  }
+}
+.saga-fill {
+  width: 345px;
+  // height: 220px;
+  .doughnut-view {
+    height: 165px;
+    width: 100%;
+    padding: 0 5px;
+    box-sizing: border-box;
+  }
+}
+</style>

+ 120 - 0
src/components/ledger/report/dataorigin.vue

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

+ 2 - 1
src/components/model/file/addFolder.vue

@@ -5,12 +5,13 @@
         <el-form
           :model="ruleForm"
           :rules="rules"
+          @submit.native.prevent
           ref="addFolderModel"
           label-width="100px"
           class="demo-ruleForm"
         >
           <el-form-item label="文件夹名称" prop="name">
-            <el-input v-model="ruleForm.name" focus></el-input>
+            <el-input v-model="ruleForm.name"  @keyup.enter.native="addFolder" focus></el-input>
           </el-form-item>
         </el-form>
       </div>

+ 18 - 10
src/components/model/file/floorTable.vue

@@ -14,32 +14,40 @@
       <el-table-column label="版本号">
         <template slot-scope="scope">
           <span style="margin-right: 5px">{{ scope.row.Version }}</span>
-          <i v-show="scope.row.Version" class="iconfont icon-warn" style="cursor:pointer;" title="查看版本更新信息" @click="handleClickVersion(scope.row)"></i>
+          <i v-show="scope.row.Version && scope.row.Status == 4" class="iconfont icon-warn" style="cursor:pointer;" title="查看版本更新信息" @click="handleClickVersion(scope.row)"></i>
         </template>
       </el-table-column>
-      <el-table-column prop="AcceptTime" label="上传时间"></el-table-column>
+      <el-table-column prop="AcceptTime" label="上传时间" width="140"></el-table-column>
       <el-table-column prop="UserName" label="上传人"></el-table-column>
       <el-table-column prop="address" align="center" label="操作" width="240">
         <template slot-scope="scope">
-          <div class="operate" v-show="!scope.row.isDown">
+          <div class="operate" v-show="scope.row.Status == 4">
             <el-button type="primary" size="mini" class="iconfont icon-download" @click="downloadModel(scope.row)"></el-button>
             <el-button type="primary" size="mini" class="iconfont icon-replace" @click="repliaceModel(scope.row)"></el-button>
             <el-button type="primary" size="mini" class="iconfont icon-Log" @click="queryModelLog(scope.row)"></el-button>
           </div>
           <div
             :class="['upLoad-loading']"
-            v-show="scope.row.isDown">
+            v-show="scope.row.Status != 4">
             <div class="progress">
               <el-progress
                 :text-inside="false"
                 :stroke-width="20" :percentage="100"
-                :color="scope.row.Status == 1 || scope.row.Status == 10 || scope.row.Status == 11?'#909399':'#67C23A'"></el-progress>
+                :color="scope.row.Status?'#909399':'#67C23A'"></el-progress>
             </div>
             <div class="progress-right">
-              <span v-show="!scope.row.Status">上传中</span>
+              <span v-if="!scope.row.Status">上传中...</span>
+              <span v-else-if="scope.row.Status == 1">等待检查...</span>
+              <span v-else>模型检查中...</span>
+
+              <!-- <span v-show="!scope.row.Status">上传中...</span>
               <span v-show="scope.row.Status == 1">等待检查...</span>
-              <span v-show="scope.row.Status == 10">模型检查中</span>
+              <span v-show="scope.row.Status == 10">模型检查中...</span>
               <span v-show="scope.row.Status == 11">未通过检查</span>
+              <span v-show="scope.row.Status == 2 || scope.row.Status == 20">等待数据导出...</span>
+              <span v-show="scope.row.Status == 21">模型数据导出失败</span>
+              <span v-show="scope.row.Status == 3">处理导出数据中...</span>
+              <span v-show="scope.row.Status == 31">同步到数据中心失败</span> -->
             </div>
           </div>
         </template>
@@ -102,7 +110,6 @@ export default {
             } else if (precent == 101) {
               // 如过precent == 101 则返回结果为suceess 不能关闭进度条,
               item.precent = 100;
-              item.isDown = false;
               this.$emit("percentFinish");
             }
             return;
@@ -114,9 +121,10 @@ export default {
     },
     // 下载模型文件
     downloadModel(item) {
-      if (item.Url) {
+      let url = item.Url.match(/(\/image-service\S*)$/g)?item.Url.match(/(\/image-service\S*)$/g)[0]:''
+      if (url) {
         let a = document.createElement("a");
-        a.href = item.Url;
+        a.href = url;
         a.download = `${this.modelFolderName}${item.FloorName}模型文件v${item.Version}.rvt`;
         a.click();
       } else {

+ 5 - 3
src/components/model/file/modelLog.vue

@@ -3,13 +3,14 @@
   <div id="modelLog">
     <el-dialog title="模型日志" :visible.sync="modelLogVisible" width="40%" :before-close="handleClose">
       <div class="bodys">
+        <el-button v-show="filterlogData.length == 1" class="delete-model" @click="deleteModel(filterlogData[0])"><i class="iconfont icon-delete el-icon--left"></i>删除模型</el-button>
         <el-tabs v-model="activeName" type="card" @tab-click="changeModel">
           <el-tab-pane label="上传日志" name="first">
             <el-table :data="filterlogData" stripe height="300px" style="width: 100%">
               <el-table-column label="版本">
                 <template slot-scope="scope">
                   <span style="margin-right: 5px">{{ scope.row.Version }}</span>
-                  <i v-show="scope.row.Version" class="iconfont icon-warn" style="cursor:pointer;" title="查看版本更新信息" @click="handleClickVersion(scope.row)"></i>
+                  <i v-show="scope.row.Version && scope.row.Status == 4" class="iconfont icon-warn" style="cursor:pointer;" title="查看版本更新信息" @click="handleClickVersion(scope.row)"></i>
                 </template>
               </el-table-column>
               <el-table-column prop="AcceptTime" label="上传时间"></el-table-column>
@@ -73,9 +74,10 @@ export default {
     },
     handleClick(item) {
       console.log(item);
+      let url = item.Url.match(/(\/image-service\S*)$/g)?item.Url.match(/(\/image-service\S*)$/g)[0]:''
       if (item.Url) {
         let a = document.createElement("a");
-        a.href = item.Url;
+        a.href = url;
         a.download =`${this.modelFolderName}${item.FloorName}模型文件v${item.Version}.rvt`;
         a.click();
       } else {
@@ -101,7 +103,7 @@ export default {
         }
       )
         .then(() => {
-          request.deleteModelFileList(item.Id, res => {
+          request.deleteModelFileList({Id: item.Id}, res => {
             if (res.Result == "success") {
               //  刷新页面
               this.$emit("deleteFinish");

+ 130 - 11
src/components/model/file/versionDialog.vue

@@ -1,19 +1,47 @@
 <template>
-  <el-dialog :title="title" :visible.sync="dialog" :before-close="handleClose" width="900px" id="">
+  <el-dialog :title="title" :visible.sync="dialog" :before-close="handleClose" width="900px">
+    <div class="content">
+      <el-scrollbar style="height:100%;">
+        <span>上传人:{{versionData.userName}}</span>
+        <span style="marginLeft:30px;">上传时间:{{versionData.acceptTime}}</span>
+        <p style="marginTop:15px;">更新内容:</p>
+        <el-divider>新增设备概要内容</el-divider>
+        <p style="marginBottom:10px;">于【{{versionData.acceptTime}}】上传模型文件,新增设备实例如下:</p>
+        <p v-for="(item, key) in versionData.createData" :key="'C'+key">【{{mapType[key]}}】:【{{item.length}}】个</p>
+        <el-divider>删除设备概要内容</el-divider>
+        <p style="marginBottom:10px;">于【{{versionData.acceptTime}}】上传模型文件,删除设备实例如下:</p>
+        <p v-for="(item, key) in versionData.deleteData" :key="'D'+key">【{{mapType[key]}}】:【{{item.length}}】个</p>
+        <el-divider>新增设备</el-divider>
+        <div v-for="(item, key) in versionData.createData" :key="'CL'+key">
+          <p>【{{mapType[key]}}】</p>
+          <p v-for="(obj, i) in item" :key="obj.Id">【{{i+1}}】、建筑:【{{obj.BuildingName || "无"}}】;楼层:【{{obj.FloorName || "无"}}】;设备全局id:【{{obj.ObjId || "无"}}】;BIMID:【{{obj.BimId || "无"}}】;设备本地编码:【{{obj.LocalId || "无"}}】;设备本地名称:【{{obj.LocalName || "无"}}】;CADID:【{{obj.CadId || "无"}}】;</p>
+        </div>
+        <el-divider>删除设备</el-divider>
+        <div v-for="(item, key) in versionData.deleteData" :key="'DL'+key">
+          <p>【{{mapType[key]}}】</p>
+          <p v-for="(obj, i) in item" :key="obj.Id">【{{i+1}}】、建筑:【{{obj.BuildingName || "无"}}】;楼层:【{{obj.FloorName || "无"}}】;设备全局id:【{{obj.ObjId || "无"}}】;BIMID:【{{obj.BimId || "无"}}】;设备本地编码:【{{obj.LocalId || "无"}}】;设备本地名称:【{{obj.LocalName || "无"}}】;CADID:【{{obj.CadId || "无"}}】;</p>
+        </div>
+      </el-scrollbar>
+    </div>
     <span slot="footer" class="dialog-footer">
-      <el-button size="small" @click="handleClose">取 消</el-button>
-      <el-button size="small" type="primary">确 定</el-button>
+      <el-button size="small" type="primary" @click="handleClose">确认创建</el-button>
+      <!-- <el-button size="small" type="primary">确 定</el-button> -->
     </span>
   </el-dialog>
 </template>
 
 <script>
 import { mapGetters } from "vuex";
-import request from "@/api/model/file.js";
+import { querySyncLogCount } from "@/api/model/file.js";
+import { getAllEqPaType } from "@/api/scan/request";
 export default {
   components: {
 
   },
+  props: {
+    dialogVisible: Boolean,
+    modelFile: Object,
+  },
   computed: {
     ...mapGetters("layout", ["projectId"]),
     dialog() {
@@ -23,25 +51,108 @@ export default {
   data() {
     return {
       title: "版本文件信息",
+      versionData: {
+        userName: '',
+        acceptTime: '',
+        createData: {},
+        deleteData:{}
+      },
+      mapType: { },
     }
   },
-  props: {
-    dialogVisible: Boolean,
-    modelFile: Object,
-  },
   mounted() { },
   methods: {
     // 关闭弹窗
     handleClose() {
       this.$emit("update:dialogVisible", false);
     },
+    // 获取版本信息
+    getData() {
+      if(this.modelFile.Id || this.modelFile.CurrentModelId){
+        this.versionData.userName = this.modelFile.UserName;
+        this.versionData.acceptTime = this.modelFile.AcceptTime;
+        let promise1 = new Promise((resolve, reject) => {
+            querySyncLogCount({Filters: `ModelId='${this.modelFile.CurrentModelId?this.modelFile.CurrentModelId:this.modelFile.Id}'`}, res => {
+                resolve(res)
+            })
+        })
+        let promise2 = new Promise((resolve, reject) => {
+            getAllEqPaType({}, res => {
+                resolve(res)
+            })
+        })
+        Promise.all([promise1, promise2]).then(values => {
+          let versionData = values[0].Content, typeList = values[1].Content;
+          typeList.forEach(item => {
+            this.mapType[item.Code] = item.Name;
+          });
+          console.log(this.mapType)
+          versionData.forEach(item => {
+            if(item.Operation){
+              if(this.versionData.createData[item.Type]){
+                this.versionData.createData[item.Type].push(item);
+              } else {
+                this.versionData.createData[item.Type] = [];
+                this.versionData.createData[item.Type].push(item);
+              }
+            } else {
+              if(this.versionData.deleteData[item.Type]){
+                this.versionData.deleteData[item.Type].push(item);
+              } else {
+                this.versionData.deleteData[item.Type] = [];
+                this.versionData.deleteData[item.Type].push(item);
+              }
+            }
+          });
+          this.$forceUpdate();
+        })
+        console.log(this.versionData)
+      }
+    },
+    // 获取版本信息
+    getVersionData() {
+      if(this.modelFile.Id || this.modelFile.CurrentModelId){
+        this.versionData.userName = this.modelFile.UserName;
+        this.versionData.acceptTime = this.modelFile.AcceptTime;
+        querySyncLogCount({Filters: `ModelId='${this.modelFile.CurrentModelId?this.modelFile.CurrentModelId:this.modelFile.Id}'`}, res => {
+          res.Content.forEach(item => {
+            if(item.Operation){
+              if(this.versionData.createData[item.Type]){
+                this.versionData.createData[item.Type].push(item);
+              } else {
+                this.versionData.createData[item.Type] = [];
+                this.versionData.createData[item.Type].push(item);
+              }
+            } else {
+              if(this.versionData.deleteData[item.Type]){
+                this.versionData.deleteData[item.Type].push(item);
+              } else {
+                this.versionData.deleteData[item.Type] = [];
+                this.versionData.deleteData[item.Type].push(item);
+              }
+            }
+          });
+          this.$forceUpdate();
+        })
+        console.log(this.versionData)
+      }
+    },
   },
   watch: {
     dialogVisible: {
       handler() {
         if (this.dialogVisible) {
-          // this.tableData = [];
-          // this.getTableData();
+          this.versionData = {
+            userName: '',
+            acceptTime: '',
+            createData: {},
+            deleteData:{}
+          };
+          if(Object.keys(this.mapType).length) {
+            this.getVersionData();
+          } else {
+            this.getData();
+          }
         }
       },
       immediate: true
@@ -50,5 +161,13 @@ export default {
 };
 </script>
 <style lang="less" scoped>
-
+.content{
+  height: 400px;
+  font-size: 16px;
+  font-weight: 650;
+  color: #333;
+  /deep/ .el-scrollbar__wrap {
+    overflow-x: hidden;
+  }
+}
 </style>

+ 3 - 2
src/components/point/dynamicdata/buildRules.vue

@@ -28,12 +28,13 @@
         </el-col>
         <el-col :span="2">
           <el-tooltip class="item" effect="dark" :content="`填充${typeName}标识与实例对应规则`" placement="left">
-            <el-button size="small" type="primary" @click="toAddRelation" icon="el-icon-edit-outline" style="float:right;" :disabled="isPending">
+            <el-button size="small" type="primary" @click="toAddRelation" icon="el-icon-edit-outline" style="float:right;margin-left:10px;"
+              :disabled="isPending">
             </el-button>
           </el-tooltip>
           <el-tooltip class="item" effect="dark" :content="`根据${typeName}标识自动填充实例`" placement="left">
             <el-button size="small" type="primary" @click="autoGroupRela" :icon="autoLoading?'iconfont icon-jiazai':'iconfont icon-zidong'"
-              style="float:right;padding:7px 14px;margin-right:10px;" :disabled="autoLoading"></el-button>
+              style="float:right;padding:7px 14px;width:44px;margin-left:0;" :disabled="autoLoading"></el-button>
           </el-tooltip>
         </el-col>
       </el-row>

+ 3 - 2
src/components/point/dynamicdata/equipRules.vue

@@ -28,12 +28,13 @@
         </el-col>
         <el-col :span="2">
           <el-tooltip class="item" effect="dark" :content="`填充${typeName}标识与实例对应规则`" placement="left">
-            <el-button size="small" type="primary" @click="toAddRelation" icon="el-icon-edit-outline" style="float:right;" :disabled="isPending">
+            <el-button size="small" type="primary" @click="toAddRelation" icon="el-icon-edit-outline" style="float:right;margin-left:10px;"
+              :disabled="isPending">
             </el-button>
           </el-tooltip>
           <el-tooltip class="item" effect="dark" :content="`根据${typeName}标识自动填充实例`" placement="left">
             <el-button size="small" type="primary" @click="autoGroupRela" :icon="autoLoading?'iconfont icon-jiazai':'iconfont icon-zidong'"
-              style="float:right;padding:7px 14px;margin-right:10px;" :disabled="autoLoading"></el-button>
+              style="float:right;padding:7px 14px;width:44px;margin-left:0;" :disabled="autoLoading"></el-button>
           </el-tooltip>
         </el-col>
       </el-row>

+ 3 - 2
src/components/point/dynamicdata/floorRules.vue

@@ -28,12 +28,13 @@
         </el-col>
         <el-col :span="2">
           <el-tooltip class="item" effect="dark" :content="`填充${typeName}标识与实例对应规则`" placement="left">
-            <el-button size="small" type="primary" @click="toAddRelation" icon="el-icon-edit-outline" style="float:right;" :disabled="isPending">
+            <el-button size="small" type="primary" @click="toAddRelation" icon="el-icon-edit-outline" style="float:right;margin-left:10px;"
+              :disabled="isPending">
             </el-button>
           </el-tooltip>
           <el-tooltip class="item" effect="dark" :content="`根据${typeName}标识自动填充实例`" placement="left">
             <el-button size="small" type="primary" @click="autoGroupRela" :icon="autoLoading?'iconfont icon-jiazai':'iconfont icon-zidong'"
-              style="float:right;padding:7px 14px;margin-right:10px;" :disabled="autoLoading"></el-button>
+              style="float:right;padding:7px 14px;width:44px;margin-left:0;" :disabled="autoLoading"></el-button>
           </el-tooltip>
         </el-col>
       </el-row>

+ 10 - 7
src/components/point/dynamicdata/partsRules.vue

@@ -28,11 +28,12 @@
         </el-col>
         <el-col :span="2">
           <el-tooltip class="item" effect="dark" :content="`填充${typeName}标识与实例对应规则`" placement="left">
-            <el-button size="small" type="primary" @click="toAddRelation" icon="el-icon-edit-outline" style="float:right;" :disabled="isPending"></el-button>
+            <el-button size="small" type="primary" @click="toAddRelation" icon="el-icon-edit-outline" style="float:right;margin-left:10px;"
+              :disabled="isPending"></el-button>
           </el-tooltip>
           <el-tooltip class="item" effect="dark" :content="`根据${typeName}标识自动填充实例`" placement="left">
             <el-button size="small" type="primary" @click="autoGroupRela" :icon="autoLoading?'iconfont icon-jiazai':'iconfont icon-zidong'"
-              style="float:right;padding:7px 14px;margin-right:10px;" :disabled="autoLoading"></el-button>
+              style="float:right;padding:7px 14px;width:44px;margin-left:0;" :disabled="autoLoading"></el-button>
           </el-tooltip>
         </el-col>
       </el-row>
@@ -57,9 +58,11 @@
         <el-table-column prop="ObjectLocalName" :label="`${typeName}实例`" show-overflow-tooltip min-width="100" class-name="td-bl"></el-table-column>
         <el-table-column label="所在建筑楼层" min-width="100">
           <template slot-scope="scope">
-            <el-tooltip :content="scope.row.BuildLocalName?scope.row.FloorLocalName?scope.row.BuildLocalName+'-'+scope.row.FloorLocalName:scope.row.BuildLocalName:''"
+            <el-tooltip
+              :content="scope.row.BuildLocalName?scope.row.FloorLocalName?scope.row.BuildLocalName+'-'+scope.row.FloorLocalName:scope.row.BuildLocalName:''"
               placement="top">
-              <div class="tool-tip">{{scope.row.BuildLocalName?scope.row.FloorLocalName?scope.row.BuildLocalName+'-'+scope.row.FloorLocalName:scope.row.BuildLocalName:''}}
+              <div class="tool-tip">
+                {{scope.row.BuildLocalName?scope.row.FloorLocalName?scope.row.BuildLocalName+'-'+scope.row.FloorLocalName:scope.row.BuildLocalName:''}}
               </div>
             </el-tooltip>
           </template>
@@ -69,8 +72,8 @@
         <el-table-column prop="action" label="操作" min-width="100">
           <template slot-scope="scope">
             <el-tooltip class="item" effect="dark" content="清除对应规则" placement="left">
-              <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain :disabled="isPending||scope.row.Related=='False'"
-                icon="el-icon-delete"></el-button>
+              <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain
+                :disabled="isPending||scope.row.Related=='False'" icon="el-icon-delete"></el-button>
             </el-tooltip>
           </template>
         </el-table-column>
@@ -230,7 +233,7 @@ export default {
     },
     //自动对应实例
     autoGroupRela() {
-      this.$emit('autoGroupRela','parts');
+      this.$emit('autoGroupRela', 'parts');
     }
   },
   watch: {

+ 10 - 7
src/components/point/dynamicdata/spaceRules.vue

@@ -28,11 +28,12 @@
         </el-col>
         <el-col :span="2">
           <el-tooltip class="item" effect="dark" :content="`填充${typeName}标识与实例对应规则`" placement="left">
-            <el-button size="small" type="primary" @click="toAddRelation" icon="el-icon-edit-outline" style="float:right;" :disabled="isPending"></el-button>
+            <el-button size="small" type="primary" @click="toAddRelation" icon="el-icon-edit-outline" style="float:right;margin-left:10px;"
+              :disabled="isPending"></el-button>
           </el-tooltip>
           <el-tooltip class="item" effect="dark" :content="`根据${typeName}标识自动填充实例`" placement="left">
             <el-button size="small" type="primary" @click="autoGroupRela" :icon="autoLoading?'iconfont icon-jiazai':'iconfont icon-zidong'"
-              style="float:right;padding:7px 14px;margin-right:10px;" :disabled="autoLoading"></el-button>
+              style="float:right;padding:7px 14px;width:44px;margin-left:0;" :disabled="autoLoading"></el-button>
           </el-tooltip>
         </el-col>
       </el-row>
@@ -57,9 +58,11 @@
         <el-table-column prop="ObjectLocalName" :label="`${typeName}实例`" show-overflow-tooltip min-width="100" class-name="td-bl"></el-table-column>
         <el-table-column label="所在建筑楼层" min-width="300">
           <template slot-scope="scope">
-            <el-tooltip :content="scope.row.BuildLocalName?scope.row.FloorLocalName?scope.row.BuildLocalName+'-'+scope.row.FloorLocalName:scope.row.BuildLocalName:''"
+            <el-tooltip
+              :content="scope.row.BuildLocalName?scope.row.FloorLocalName?scope.row.BuildLocalName+'-'+scope.row.FloorLocalName:scope.row.BuildLocalName:''"
               placement="top">
-              <div class="tool-tip">{{scope.row.BuildLocalName?scope.row.FloorLocalName?scope.row.BuildLocalName+'-'+scope.row.FloorLocalName:scope.row.BuildLocalName:''}}
+              <div class="tool-tip">
+                {{scope.row.BuildLocalName?scope.row.FloorLocalName?scope.row.BuildLocalName+'-'+scope.row.FloorLocalName:scope.row.BuildLocalName:''}}
               </div>
             </el-tooltip>
           </template>
@@ -69,8 +72,8 @@
         <el-table-column prop="action" label="操作" min-width="100">
           <template slot-scope="scope">
             <el-tooltip class="item" effect="dark" content="清除对应规则" placement="left">
-              <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain :disabled="isPending||scope.row.Related=='False'"
-                icon="el-icon-delete"></el-button>
+              <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain
+                :disabled="isPending||scope.row.Related=='False'" icon="el-icon-delete"></el-button>
             </el-tooltip>
           </template>
         </el-table-column>
@@ -230,7 +233,7 @@ export default {
     },
     //自动对应实例
     autoGroupRela() {
-      this.$emit('autoGroupRela','space');
+      this.$emit('autoGroupRela', 'space');
     }
   },
   watch: {

+ 6 - 5
src/components/point/dynamicdata/systemRules.vue

@@ -28,11 +28,12 @@
         </el-col>
         <el-col :span="2">
           <el-tooltip class="item" effect="dark" :content="`填充${typeName}标识与实例对应规则`" placement="left">
-            <el-button size="small" type="primary" @click="toAddRelation" icon="el-icon-edit-outline" style="float:right;" :disabled="isPending"></el-button>
+            <el-button size="small" type="primary" @click="toAddRelation" icon="el-icon-edit-outline" style="float:right;margin-left:10px;"
+              :disabled="isPending"></el-button>
           </el-tooltip>
           <el-tooltip class="item" effect="dark" :content="`根据${typeName}标识自动填充实例`" placement="left">
             <el-button size="small" type="primary" @click="autoGroupRela" :icon="autoLoading?'iconfont icon-jiazai':'iconfont icon-zidong'"
-              style="float:right;padding:7px 14px;margin-right:10px;" :disabled="autoLoading"></el-button>
+              style="float:right;padding:7px 14px;width:44px;margin-left:0;" :disabled="autoLoading"></el-button>
           </el-tooltip>
         </el-col>
       </el-row>
@@ -69,8 +70,8 @@
         <el-table-column prop="action" label="操作" min-width="100">
           <template slot-scope="scope">
             <el-tooltip class="item" effect="dark" content="清除对应规则" placement="left">
-              <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain :disabled="isPending||scope.row.Related=='False'"
-                icon="el-icon-delete"></el-button>
+              <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain
+                :disabled="isPending||scope.row.Related=='False'" icon="el-icon-delete"></el-button>
             </el-tooltip>
           </template>
         </el-table-column>
@@ -230,7 +231,7 @@ export default {
     },
     //自动对应实例
     autoGroupRela() {
-      this.$emit('autoGroupRela','system');
+      this.$emit('autoGroupRela', 'system');
     }
   },
   watch: {

+ 10 - 7
src/components/point/dynamicdata/tenantRules.vue

@@ -28,11 +28,12 @@
         </el-col>
         <el-col :span="2">
           <el-tooltip class="item" effect="dark" :content="`填充${typeName}标识与实例对应规则`" placement="left">
-            <el-button size="small" type="primary" @click="toAddRelation" icon="el-icon-edit-outline" style="float:right;" :disabled="isPending"></el-button>
+            <el-button size="small" type="primary" @click="toAddRelation" icon="el-icon-edit-outline" style="float:right;margin-left:10px;"
+              :disabled="isPending"></el-button>
           </el-tooltip>
           <el-tooltip class="item" effect="dark" :content="`根据${typeName}标识自动填充实例`" placement="left">
             <el-button size="small" type="primary" @click="autoGroupRela" :icon="autoLoading?'iconfont icon-jiazai':'iconfont icon-zidong'"
-              style="float:right;padding:7px 14px;margin-right:10px;" :disabled="autoLoading"></el-button>
+              style="float:right;padding:7px 14px;margin-left:0;width:44px;" :disabled="autoLoading"></el-button>
           </el-tooltip>
         </el-col>
       </el-row>
@@ -57,9 +58,11 @@
         <el-table-column prop="ObjectLocalName" :label="`${typeName}实例`" show-overflow-tooltip min-width="100" class-name="td-bl"></el-table-column>
         <el-table-column label="所在业务空间" min-width="300">
           <template slot-scope="scope">
-            <el-tooltip :content="scope.row.BuildLocalName?scope.row.FloorLocalName?scope.row.BuildLocalName+'-'+scope.row.FloorLocalName:scope.row.BuildLocalName:''"
+            <el-tooltip
+              :content="scope.row.BuildLocalName?scope.row.FloorLocalName?scope.row.BuildLocalName+'-'+scope.row.FloorLocalName:scope.row.BuildLocalName:''"
               placement="top">
-              <div class="tool-tip">{{scope.row.BuildLocalName?scope.row.FloorLocalName?scope.row.BuildLocalName+'-'+scope.row.FloorLocalName:scope.row.BuildLocalName:''}}
+              <div class="tool-tip">
+                {{scope.row.BuildLocalName?scope.row.FloorLocalName?scope.row.BuildLocalName+'-'+scope.row.FloorLocalName:scope.row.BuildLocalName:''}}
               </div>
             </el-tooltip>
           </template>
@@ -69,8 +72,8 @@
         <el-table-column prop="action" label="操作" min-width="100">
           <template slot-scope="scope">
             <el-tooltip class="item" effect="dark" content="清除对应规则" placement="left">
-              <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain :disabled="isPending||scope.row.Related=='False'"
-                icon="el-icon-delete"></el-button>
+              <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain
+                :disabled="isPending||scope.row.Related=='False'" icon="el-icon-delete"></el-button>
             </el-tooltip>
           </template>
         </el-table-column>
@@ -230,7 +233,7 @@ export default {
     },
     //自动对应实例
     autoGroupRela() {
-      this.$emit('autoGroupRela','tenant');
+      this.$emit('autoGroupRela', 'tenant');
     }
   },
   watch: {

+ 1 - 1
src/components/point/report/integrateStatistics.vue

@@ -20,7 +20,7 @@
       <hr style="width:90%;margin-top: 1px;" />
       <div ref="barchart" class="chart" id="barchart" :style="{height:barChartData.length * 120 + 'px'}"></div>
     </div>
-    <!-- 点位/表号共更好对应总览 -->
+    <!-- 点位/表号功能号对应总览 -->
     <pointTabOverview ref="overviewDialog"></pointTabOverview>
   </div>
 </template>

+ 2 - 2
src/components/point/report/pointTabOverview.vue

@@ -1,8 +1,8 @@
 <template>
-  <!-- 点位/表号共更好对应总览 -->
+  <!-- 点位/表号功能号对应总览 -->
   <div id="pointTabOverview">
     <!-- 对话框 -->
-    <el-dialog title="点位/表号共更好对应总览" :visible.sync="dialogVisiable">
+    <el-dialog title="点位/表号功能号对应总览" :visible.sync="dialogVisiable">
       <el-tabs v-model="activeName" style="height:600px;overflow:auto;">
         <!-- 一对多数据 -->
         <el-tab-pane label="一对多" name="otm">

+ 48 - 30
src/components/point/report/tabFunNumOverview.vue

@@ -2,8 +2,8 @@
   <div id="tabFunNumOverview">
     <!-- 查询 新增 -->
     <div class="query-area" style="padding:10px;">
-      <el-input :placeholder="`请输入表号功能号`" v-model="tabFunNum" @keyup.enter.native="getOverViewList()" style="width:240px;">
-        <i slot="suffix" class="el-input__icon el-icon-search" @click="getOverViewList()"></i>
+      <el-input :placeholder="`请输入表号功能号`" v-model="tabFunNum" @keyup.enter.native="handleCurrentChange(1)" style="width:240px;">
+        <i slot="suffix" class="el-input__icon el-icon-search" @click="handleCurrentChange(1)"></i>
       </el-input>
       <p style="overflow: hidden;float:right;">
         <el-button style="height:32px" @click='handleDrawer({},3)'>新增自定义</el-button>
@@ -22,17 +22,19 @@
         <el-table-column prop='MeterFunc' label='表号-功能号' show-overflow-tooltip min-width="100" header-align='left'></el-table-column>
         <el-table-column prop='Data.Data' label='查看分精度' show-overflow-tooltip min-width="90" header-align='center' align='center'>
           <template slot-scope="scope">
-            <el-button style="padding:7px 15px;" @click="handleDrawer(scope.row, 0)"><i class="el-icon-s-data" style="font-size:15px;"></i></el-button>
+            <el-button style="padding:7px 15px;" @click="handleDrawer(scope.row, 0)"><i class="el-icon-s-data" style="font-size:15px;"></i>
+            </el-button>
           </template>
         </el-table-column>
-        <el-table-column prop='Data.Time' label='对应值 - 获取时间' show-overflow-tooltip min-width="270" header-align='center' align='center' style="position:relative;">
+        <el-table-column prop='Data.Time' label='对应值 - 获取时间' show-overflow-tooltip min-width="270" header-align='center' align='center'
+          style="position:relative;">
           <template slot-scope="scope">
             <div style="width:175px;display:inline-block;">
               <span style="line-height:29px;">{{ scope.row.Data? (scope.row.Data.Data  || '--'): '--' }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
               <span style="line-height:29px;">{{ scope.row.Data? scope.row.Data.Time : '' }}</span>
             </div>
             <span style="width:55.33px;display:inline-block;padding-left:10px;">
-            <el-button class="dialog-btn" @click="refreshThisRow(scope.row)"><i class="el-icon-refresh"></i></el-button>
+              <el-button class="dialog-btn" @click="refreshThisRow(scope.row)"><i class="el-icon-refresh"></i></el-button>
             </span>
           </template>
         </el-table-column>
@@ -48,15 +50,15 @@
           <template slot-scope="scope">
             <span style="display:inline-block;width:16px;line-height:29px;">{{ scope.row.RelatedInstance }}</span>
             <span style="width:55.33px;display:inline-block;padding-left:10px;">
-              <el-button class="dialog-btn" v-if="scope.row.RelatedInstance" @click="handleDrawer(scope.row, 2)"><i class="el-icon-coin"></i></el-button>
+              <el-button class="dialog-btn" v-if="scope.row.RelatedInstance" @click="handleDrawer(scope.row, 2)"><i class="el-icon-coin"></i>
+              </el-button>
             </span>
           </template>
         </el-table-column>
       </el-table>
       <!-- 分页 -->
       <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="pageSizes"
-        :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="allTableData.length"
-        style="float:right;margin-top:10px;padding:2px 5px;">
+        :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total" style="float:right;margin-top:10px;padding:2px 5px;">
       </el-pagination>
     </div>
     <!-- 对话框和抽屉统一放在drawers中 -->
@@ -96,10 +98,12 @@ export default {
         color: '#2b2b2b',
         lineHeight: '30px'
       },
-      allTableData: [],//所有表格数据
+      // allTableData: [],//所有表格数据
+      tableData: [],
       pageSizes: [10, 20, 50, 100],
       pageSize: 50,
       currentPage: 1,
+      total: 0,
       loading: false,//加载
       tabFunNum: null,//表号功能号
       //抽屉
@@ -134,8 +138,15 @@ export default {
     //获取统计数据
     getOverViewList() {
       this.loading = true;
-      getTabFunNumOverview({ MeterFunc: this.tabFunNum }, res => {
-        this.allTableData = res.Content;
+      let pa = {
+        MeterFunc: this.tabFunNum,
+        PageSize: this.pageSize,
+        PageNumber: this.currentPage
+      }
+      getTabFunNumOverview(pa, res => {
+        // this.allTableData = res.Content;
+        this.tableData = res.Content;
+        this.total = res.Total
         this.loading = false;
       });
     },
@@ -146,23 +157,30 @@ export default {
         MeterFunc: row.MeterFunc
       }
       getTabFunNumOverview(pa, res => {
-        if (res.Content[0].Data) {
-          this.tableData[index].Data.Data = res.Content[0].Data.Data;
-          this.tableData[index].Data.Time = res.Content[0].Data.Time;
-        }
-        this.tableData[index].DataQuality = res.Content[0].DataQuality;
-        this.tableData[index].RelatedInstance = res.Content[0].RelatedInstance;
-        this.tableData[index].RelatedPoint = res.Content[0].RelatedPoint;
+        res.Content.forEach(t => {
+          if (t.MeterFunc == row.MeterFunc) {
+            if (t.Data) {
+              this.tableData[index].Data.Data = t.Data.Data || '';
+              this.tableData[index].Data.Time = t.Data.Time || '';
+            }
+            this.tableData[index].DataQuality = t.DataQuality;
+            this.tableData[index].RelatedInstance = t.RelatedInstance;
+            this.tableData[index].RelatedPoint = t.RelatedPoint;
+          }
+        })
         Message.success('已刷新');
       });
     },
     //分页更换size
     handleSizeChange(val) {
+      this.currentPage = 1;
       this.pageSize = val;
+      this.getOverViewList()
     },
     //分页更换页
     handleCurrentChange(val) {
       this.currentPage = val;
+      this.getOverViewList()
     },
     //子组件关闭抽屉
     closeDrawer() {
@@ -181,12 +199,12 @@ export default {
   },
   computed: {
     //根据分页,获取要展示的tableData
-    tableData: function () {
-      return this.allTableData.slice(
-        (this.currentPage - 1) * this.pageSize,
-        (this.currentPage * this.pageSize < this.allTableData.length) ? this.currentPage * this.pageSize : this.allTableData.length);
+    // tableData: function () {
+    //   return this.allTableData.slice(
+    //     (this.currentPage - 1) * this.pageSize,
+    //     (this.currentPage * this.pageSize < this.allTableData.length) ? this.currentPage * this.pageSize : this.allTableData.length);
 
-    }
+    // }
   },
   components: {
     historyChart,
@@ -214,20 +232,20 @@ export default {
   cursor: pointer;
   float: right;
 }
-.dialog-btn{
-  display:none;
-  height:29px;
+.dialog-btn {
+  display: none;
+  height: 29px;
 }
 /deep/ .el-drawer__body {
   height: 90%;
   overflow-y: auto;
 }
-/deep/ .el-table__body-wrapper tr:hover{
-  .dialog-btn{
-    display:inline;
+/deep/ .el-table__body-wrapper tr:hover {
+  .dialog-btn {
+    display: inline;
   }
 }
 /deep/ .el-dialog__body {
-  padding-bottom:20px;
+  padding-bottom: 20px;
 }
 </style>

+ 0 - 463
src/components/relation/overview/CardList.vue

@@ -1,463 +0,0 @@
-<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"
-      >
-        <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;"
-            >
-              <!-- border:none-->
-              <!--<div class="mask"></div>-->
-              <div style="overflow: hidden">
-                <el-tooltip
-                    :content="relation.RelationTypeName"
-                    placement="top"
-                >
-                  <p class="relation-title reset-test reset-title">{{relation.RelationTypeName}}</p>
-                </el-tooltip>
-                <el-tooltip
-                    :content="relation.RelationTypeCode"
-                    placement="top"
-                >
-                  <p class="asc reset-title reset-test">边类型编码:{{relation.RelationTypeCode}}</p>
-                </el-tooltip>
-                <p class="relation-title-icon reset-test fr">
-                  <el-tooltip
-                      :content="relation.Note"
-                      placement="top"
-                      style="z-index: 3;position:relative;"
-                  >
-                    <i class="iconfont icon-warn icon"/>
-                  </el-tooltip>
-                </p>
-              </div>
-              <article>
-                <el-row>
-                  <el-col :span="13" >
-                    <div class="grid-content">
-                      <p class="object">主要连接对象</p>
-                      <el-tooltip
-                          :content="relation.ConneObject"
-                          placement="top"
-                      >
-                        <p class="group reset-title">{{relation.ConneObject}}</p>
-                      </el-tooltip>
-                    </div>
-                  </el-col>
-                  <el-col :span="1">
-                    <div class="grid-content">
-                      <p class="thread"></p>
-                    </div>
-                  </el-col>
-                  <el-col :span="10">
-                    <div class="grid-content ">
-                      <p class="line-number">连接数量</p>
-                      <p :class="relation.count > 1? 'line-number-show' :'line-number-hide'">{{relation.count}}</p>
-                      <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-"
-
-                            >
-                              <!--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>
-                    </div>
-                  </el-col>
-                </el-row>
-              </article>
-            </el-card>
-          </el-col>
-        </el-row>
-      </section>
-    </div>
-    <RelationMaintain
-        :values="values"
-        :source="source"
-        ref="maintain"
-        :isComputed="isComputed"
-        :ManualMaintenance="ManualMaintenance"
-        :TableVisibleMoreLoading="TableVisibleMoreLoading"
-        @template="templateDown"
-        @openComputed="openComputed"
-        @RelationType="RelationType"
-    />
-  </div>
-
-</template>
-
-<script>
-  import RelationMaintain from './Modal/RelationMaintain'
-
-  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: ' 下载报告文件'
-        },
-        isComputed: {}, // 当前要计算的对象
-        ManualMaintenance: {},//手动编辑对象
-      }
-    },
-    computed: {},
-
-    methods: {
-      explain() {
-        // alert('explain click')
-      },
-      RelationType() {
-        this.$emit('RelationType', this.isComputed.RelationType, this.isComputed.ZoneType)
-
-      },
-      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
-
-        }
-      },
-      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
-        }
-        this.ManualMaintenance = relation
-      },
-      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;
-  }
-
-  .container {
-    @media (max-width: 1366px) {
-      .relation-title {
-        max-width: 160px;
-      }
-
-      .group {
-        white-space: normal !important;
-      }
-
-      .asc {
-        max-width: 108px;
-      }
-      .thread{
-        margin-left: 5px !important;
-      }
-      /deep/.el-card__body {
-        padding: 18px !important;
-      }
-    }
-    .el-row {
-      margin-bottom: 20px;
-
-      &:last-child {
-        margin-bottom: 0;
-      }
-    }
-
-    .el-col {
-      border-radius: 4px;
-    }
-
-    .grid-content {
-      border-radius: 4px;
-      min-height: 36px;
-
-      .thread {
-        border-left: 1px solid @font-code;
-        margin-left: 10px;
-        min-height: 36px;
-        margin-top: 6px;
-      }
-    }
-
-    .row-bg {
-      padding: 10px 0;
-      background-color: #f9fafc;
-    }
-
-    .reset-title {
-      overflow: hidden;
-      white-space: nowrap;
-      text-overflow: ellipsis;
-    }
-
-    .reset-test {
-      float: left;
-      text-align: center;
-      height: 40px;
-      line-height: 40px;
-    }
-
-    .fr {
-      float: right;
-    }
-
-    .el-card {
-      margin: 10px 0;
-    }
-
-    .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;
-      }
-    }
-
-    .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
-      }
-    }
-
-    .relation-title {
-      font-size: 20px;
-      font-weight: @font-big;
-      margin-right: 10px;
-
-      .icon {
-        display: block;
-        float: right;
-        color: #555;
-        font-size: 18px;
-      }
-    }
-
-    .relation-title-icon {
-      font-size: 20px;
-      font-weight: @font-big;
-      overflow: hidden;
-
-      .icon {
-        display: block;
-        float: right;
-        color: #555;
-        font-size: 18px;
-      }
-    }
-
-    .asc {
-      font-size: @font-small;
-      color: @font-code;
-    }
-    .object {
-      font-size: @font-small;
-      color: @font-code;
-      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-show {
-      color: @color-text;
-      font-weight: @font-big;
-    }
-
-    .line-number-hide {
-      color: @font-code;
-      font-weight: @font-big;
-    }
-
-
-
-
-    article {
-      overflow: hidden;
-    }
-
-    .last-computed {
-      overflow: hidden;
-      color: @font-code;
-
-      .float-right {
-        float: right;
-        margin-left: @5px;
-      }
-
-      /deep/ .is-dot {
-        margin-top: 7px;
-        margin-right: @5px;
-      }
-
-    }
-  }
-</style>

+ 71 - 60
src/components/relation/overview/Modal/RelationMaintain.vue

@@ -33,8 +33,8 @@
           <el-col :span="8">
             <span class="demonstration">{{values.originEquipment}}</span>
             <el-cascader
-                :options="newOptions"
                 :key="isResouceShow"
+                :options="list"
                 v-model="ops"
                 :props="props"
                 @change="sourceOptions"
@@ -44,11 +44,13 @@
           </el-col>
           <el-col :span="8">
             <span class="demonstration">{{values.endEquipment}}</span>
-            <!--                                                    v-model="filterOps"
-            -->
+
             <el-cascader
-                :options="disOptions"
+                :options="list"
+                v-model="filterOps"
+                :key="isResouceShow"
                 :props="props"
+                @change="endOptions"
                 collapse-tags
                 clearable
             />
@@ -115,7 +117,7 @@
             <i class="iconfont icon-doc-line"/>
             {{values.currentNum}} 0
           </p>
-          <!--          <a href="/api/datacenter/graphic/template-downloads">-->
+
           <a :href="downloadProject('excel')">
             <el-button
                 type="primary"
@@ -197,7 +199,7 @@
     name: "RelationMaintain",
     props: ['values', 'isComputed', 'source', 'TableVisibleMoreLoading', 'ManualMaintenance'],
     created() {
-
+      this.showCascader()
     },
     mounted() {
     },
@@ -217,7 +219,7 @@
           value: 'lId',
           children: 'Items',
 
-        }, // 级联
+        },
         activities: [{
           content: '数据文件处理中..',
           size: 'large',
@@ -236,18 +238,19 @@
         idArr: [],//存储所有选择的id
         secondary: [],//单独存储二级数据
         list: [],//获取后台数据,重新组合,添加唯一标识和源端标识
-        isResouceShow: 0,
-        result: [],//最终传给后台的数据
-        ops: [],//第一个选择器model
+        resultOrigin: [],//最终传给后台的源端数据
+        resultEnd: [],//最终传给后台的末端数据
+        ops: [],
         filterOps: [],//为清空第二个选择器
+        isResouceShow: 0,
       }
     },
-    computed:{
+    computed: {
       ...mapGetters('layout', ['projectId']),
       headers() {
         return {
           'ProjectId': this.projectId,
-          'Comming': 'adm' ,
+          'Comming': 'adm',
           'Account': storage.get("user_name")
         }
       },
@@ -255,32 +258,12 @@
         return {
           relType: this.ManualMaintenance.RelationType || '',
           zoneType: this.ManualMaintenance.ZoneType || '',
-          projectId:this.projectId
+          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 => {
+        let arr = this.list.length && this.deepCopy(this.list).map(item => {
+          item.Items.length && item.Items.map(i => {
             if (this.idArr.includes(i.lId)) {
               i.disabled = true
             }
@@ -290,13 +273,28 @@
         })
         this.filterOps = arr
         return arr
-      }
-
+      },
     },
     methods: {
       deepCopy(obj) {
         return JSON.parse(JSON.stringify(obj))
       },
+
+      showCascader() {
+        ++this.isResouceShow
+        let copy = this.deepCopy(this.source)
+        copy.forEach(item => {
+          item.Items.forEach(child => {
+            child.lId = this.list.length
+            this.list.push(child)
+            child.Items.forEach(i => {
+              i.lId = i.Id + i.BlockId
+              i.IsSource == true && this.ops.push([child.lId, i.lId])
+              i.IsSource == false && this.filterOps.push([child.lId, i.lId])
+            })
+          })
+        })
+      },
       downloadProject(str) {
         let relType = this.ManualMaintenance.RelationType ? `?relType=${this.ManualMaintenance.RelationType}` : ''
         let zoneType = this.ManualMaintenance.ZoneType ? `&zoneType=${this.ManualMaintenance.ZoneType}` : ''
@@ -315,13 +313,11 @@
       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)
 
       },
       errBack() {
@@ -331,47 +327,58 @@
         this.dialogProcess = false
         this.dialogManualOption = false
       },
-      templateDownload() {
-        this.$emit('template')
-      },
+
       promptly() {
-        if(this.isComputed.IsAutomatic && !this.isComputed.IsSource) { //需要自动计算并且不需要配置云末端
-          console.log(this.isComputed.RelationType, 'this.isComputed.RelationType')
+        if (this.isComputed.IsAutomatic && !this.isComputed.IsSource) { //需要自动计算并且不需要配置云末端
           this.$emit('RelationType', this.isComputed.RelationType, this.isComputed.ZoneType)
-
         }
         this.dialogTableVisible = false
       },
       sourceOptions(val) {
-        //把所有id组装到一个数组
+        // this.ops = val
         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({
+          let {BlockId, BuildingId, Domain, Id, MepSystemType, ProjectId, Type, Statistics} = item
+          this.resultOrigin.push({
             BlockId,
             BuildingId,
             Domain,
-            Id,
+            // Id,
             MepSystemType,
             ProjectId,
-            Source,
-            SourceId,
+            Source: true,
+            SourceId: Id,
+            SourceType: Type,
+            Statistics
+          })
+        })
+      },
+      endOptions(val) {
+        this.idArr = val.map(item => item[1])
+        this.deepCopy(this.list).forEach(item => this.secondary.push(...item.Items))
+        let filterList = this.secondary.filter(item => this.idArr.includes(item.lId))
+        //接口需要的数据格式
+        filterList.forEach(item => {
+          let {BlockId, BuildingId, Domain, Id, MepSystemType, ProjectId, Type, Statistics} = item
+          this.resultEnd.push({
+            BlockId,
+            BuildingId,
+            Domain,
+            // Id,
+            MepSystemType,
+            ProjectId,
+            Source: false,
+            SourceId: Id,
             SourceType: Type,
             Statistics
           })
         })
-        this.result = result
-
       },
       computedUpdate() {
-        if (!this.result.length) {
+        if (!this.resultOrigin.length && !this.ops.length) {
           this.$message({
             showClose: true,
             message: '请选择源端设备类',
@@ -379,7 +386,11 @@
           });
           return false
         } else {
-          this.$emit('openComputed', this.result)
+
+          if (this.resultOrigin.length || this.resultEnd.length) {
+            this.resultOrigin.push(...this.resultEnd)
+            this.$emit('openComputed', this.resultOrigin)
+          }
           this.dialogTableVisibleMore = false
 
         }

+ 28 - 20
src/data/menus.js

@@ -111,16 +111,18 @@ export default [
 				basic: true,
 				permission: 'system:role:query'
 			}]
-		}, {
-			path: '/point/objectdata',
-			name: '配置动参从对象取值',
-			icon: '',
-			opts: [{
-				name: '查看',
-				basic: true,
-				permission: 'system:role:query'
-			}]
-		}, {
+		},
+		// {
+		// 	path: '/point/objectdata',
+		// 	name: '配置动参从对象取值',
+		// 	icon: '',
+		// 	opts: [{
+		// 		name: '查看',
+		// 		basic: true,
+		// 		permission: 'system:role:query'
+		// 	}]
+		// },
+		{
 			path: '/point/report',
 			name: '系统集成成果管理',
 			icon: '',
@@ -266,16 +268,16 @@ export default [
 		disabled: true,
 	},
 	// 关系维护
-	{
-		path: '/relation/maintain',
-		name: '关系维护',
-		icon: 'icon-guanxi',
-		opts: [{
-			name: '查看',
-			basic: true,
-			permission: 'system:user:query'
-		}]
-	},
+	// {
+	// 	path: '/relation/maintain',
+	// 	name: '关系维护',
+	// 	icon: 'icon-guanxi',
+	// 	opts: [{
+	// 		name: '查看',
+	// 		basic: true,
+	// 		permission: 'system:user:query'
+	// 	}]
+	// },
 	// 全部关系总览
 	{
 		path: '/relation/overview',
@@ -287,6 +289,12 @@ export default [
 			permission: 'system:role:query'
 		}]
 	},
+	/******************** 数据项目化交付 ***************************/
+	{
+		path: '/deliver',
+		name: '数据项目化交付',
+		disabled: true,
+	},
 	// 项目数据转换
 	{
 		path: '/relation/data',

+ 4 - 4
src/framework/components/messagesever/index.vue

@@ -2,7 +2,7 @@
  * @Author: zhangyu
  * @Date: 2019-08-26 15:22:13
  * @Info: 
- * @LastEditTime: 2019-11-13 15:46:29
+ * @LastEditTime : 2020-01-03 11:38:57
  -->
 <template>
   <div class="notification-box" v-clickOutside="handleClose" @click="handleClickRead">
@@ -118,7 +118,7 @@ export default {
             Name: "project"
           }
         ],
-        Filters: `UserId='${this.userId}'`,
+        Filters: `UserId='${this.userId}';Type!='Refresh'`,
         Orders: "CreateTime desc, Id asc",
         PageNumber: 1,
         PageSize: 10
@@ -129,7 +129,7 @@ export default {
     },
     getUnreadCount() {//获取未读消息的数量
       let params = {
-        Filters: `Read=false;UserId='${this.userId}'`
+        Filters: `Read=false;UserId='${this.userId}';Type!='Refresh'`
       }
       messgeCount(params, res => {
         this.unreadNum = res.Count
@@ -152,7 +152,7 @@ export default {
     connect() {
       this.client = Stomp.client(MQTT_SERVICE)
       this.client.reconnect_delay = 5000
-      var clientid = `sagaMQ-${this.userInfo.userName}`
+      var clientid = `sagaMQ-${this.userInfo.userName}-${new Date().getTime()}`
       var headers = {
         'login': MQTT_USERNAME,
         'passcode': MQTT_PASSWORD,

+ 11 - 9
src/framework/components/messagesever/msmq.js

@@ -23,15 +23,17 @@ const MSMQ = {
         if(data.Module && data.Module == 'Model'){ //模型文件的消息触发模型文件列表刷新事件
           Bus.$emit('modelStatusChange', data)
         }
-        Notification({ 
-          title: `${data.Title?data.Title:''}`, 
-          dangerouslyUseHTMLString: true, 
-          message: `【${this.moduleMap[data.Module]?this.moduleMap[data.Module]:data.Module}】${data.Content?data.Content.Message?data.Content.Message:'':''}`,
-          type: this.msgTypeMap[data.Type]?this.msgTypeMap[data.Type]:'info'
-        })
-        // Notification.info({ title: '消息',dangerouslyUseHTMLString: true, message: `项目编号:${data.projectId}<br>消息类型:${data.type}<br>描述信息:${data.description}<br>` })
-        unreadNum++
-        Bus.$emit('messageListUpdate', data)//消息驱动消息列表刷新
+        if(data.Type != 'Refresh'){//消息列表可见消息(注类型为'Refresh'的消息用来驱动对应服务刷新,消息中心[用户]不可见)
+          Notification({ 
+            title: `${data.Title?data.Title:''}`, 
+            dangerouslyUseHTMLString: true, 
+            message: `【${this.moduleMap[data.Module]?this.moduleMap[data.Module]:data.Module}】${data.Content?data.Content.Message?data.Content.Message:'':''}`,
+            type: this.msgTypeMap[data.Type]?this.msgTypeMap[data.Type]:'info'
+          })
+          // Notification.info({ title: '消息',dangerouslyUseHTMLString: true, message: `项目编号:${data.projectId}<br>消息类型:${data.type}<br>描述信息:${data.description}<br>` })
+          unreadNum++
+          Bus.$emit('messageListUpdate', data)//消息驱动消息列表刷新
+        }
         return unreadNum
       }
     }

+ 129 - 120
src/framework/layout/layout-store.js

@@ -1,142 +1,151 @@
 import frameworkApi from '@/api/framework'
 import storage from '@/framework/utils/storage'
 import lStorage from '@/utils/localStorage'
-import axios from 'axios'
-import authutils from '../../utils/authutils'
 
 const KEY_MENU_SELECTED = 'menu_selected'
 const KEY_PROJECT_SELECTED = 'global_project_selected'
 const KEY_PAGE_BRANDCRUMB = 'page_brandcrumb'
 
 export default {
-    namespaced: true,
+  namespaced: true,
     state: {
-        sidebarClosed: false,
-        sidebarSelected: '', // sidebar选中的选项
-        userInfo: null, //{ username: 'admin' },
-        permissions: { "system:role:delete": true, "system:role:create": true, "system:role:query": true, "system:role:setOpts": true },
-        projectId: '',
-        projects: [],
-        breadcrumb: [],
-        uploaderList: [], //当前上传文件列表
-        secret: "", //项目密码
-        userId: "", //用户id
+      sidebarClosed: false,
+      sidebarSelected: '', // sidebar选中的选项
+      userInfo: null, //{ username: 'admin' },
+      permissions: {
+        "system:role:delete": true,
+        "system:role:create": true,
+        "system:role:query": true,
+        "system:role:setOpts": true
+      },
+      projectId: '',
+      projects: [],
+      breadcrumb: [],
+      uploaderList: [], //当前上传文件列表
+      secret: "", //项目密码
+      userId: "", //用户id
+      rowEdit: false,//表格数据变化
     },
     getters: {
-        sidebarClosed: state => state.sidebarClosed,
-        secret: state => state.secret,
-        userId: state => state.userId,
-        sidebarSelected: state => {
-            // if (!state.pageSidebarSelected) {
-            //     let menu = storage.get(KEY_MENU_SELECTED)
-            //     if (menu) {
-            //         state.pageSidebarSelected = menu
-            //     }
-            // }
-            // return state.pageSidebarSelected
-            return state.sidebarSelected
-        },
-        userInfo: state => state.userInfo,
-        permissions: state => state.permissions,
-        projects: state => state.projects,
-        uploaderList: state => state.uploaderList,
-        projectId: state => {
-            if (!state.projectId) {
-                let pid = storage.get(KEY_PROJECT_SELECTED)
-                if (pid) {
-                    state.projectId = pid
-                }
-            }
-            return state.projectId
-        },
-        breadcrumb: state => {
-            if (!state.breadcrumb) {
-                let arr = storage.get(KEY_PAGE_BRANDCRUMB)
-                if (arr) {
-                    state.breadcrumb = arr
-                }
-            }
-            return state.breadcrumb
+      sidebarClosed: state => state.sidebarClosed,
+      secret: state => state.secret,
+      userId: state => state.userId,
+      sidebarSelected: state => {
+        // if (!state.pageSidebarSelected) {
+        //     let menu = storage.get(KEY_MENU_SELECTED)
+        //     if (menu) {
+        //         state.pageSidebarSelected = menu
+        //     }
+        // }
+        // return state.pageSidebarSelected
+        return state.sidebarSelected
+      },
+      userInfo: state => state.userInfo,
+      permissions: state => state.permissions,
+      projects: state => state.projects,
+      uploaderList: state => state.uploaderList,
+      projectId: state => {
+        if (!state.projectId) {
+          let pid = storage.get(KEY_PROJECT_SELECTED)
+          if (pid) {
+            state.projectId = pid
+          }
+        }
+        return state.projectId
+      },
+      breadcrumb: state => {
+        if (!state.breadcrumb) {
+          let arr = storage.get(KEY_PAGE_BRANDCRUMB)
+          if (arr) {
+            state.breadcrumb = arr
+          }
         }
+        return state.breadcrumb
+      }
     },
     mutations: {
-        setSidebarClosed: (state, val) => (state.sidebarClosed = val),
-        setSidebarSelected: (state, val) => {
-            state.sidebarSelected = val
-            storage.set(KEY_MENU_SELECTED, val)
-            lStorage.set('screen_data', { path: val, data: {} })
-        },
-        setprojectId: (state, val) => {
-            let cacheInfo = lStorage.get('cacheInfo') ? lStorage.get('cacheInfo') : {}
-            state.projectId = val
-            localStorage.setItem('projectId', val)
-            if (cacheInfo[state.userInfo.userName]) {
-                cacheInfo[state.userInfo.userName].projectId = val
-                lStorage.set('cacheInfo', cacheInfo)
-            } else {
-                cacheInfo[state.userInfo.userName] = { projectId: val }
-                lStorage.set('cacheInfo', cacheInfo)
-            }
-            storage.set(KEY_PROJECT_SELECTED, val)
-            state.projects.map((item) => {
-                if (item.id == val) {
-                    state.secret = item.pwd
-                    localStorage.setItem('secret', item.pwd)
-                }
-            })
-        },
-        setUploaderList: (state, val) => {
-            state.uploaderList = val?val:[]
+      setRowEdit: (state, val) => (state.rowEdit = val),
+      setSidebarClosed: (state, val) => (state.sidebarClosed = val),
+      setSidebarSelected: (state, val) => {
+        state.sidebarSelected = val
+        storage.set(KEY_MENU_SELECTED, val)
+        lStorage.set('screen_data', {path: val, data: {}})
+      },
+      setprojectId: (state, val) => {
+        let cacheInfo = lStorage.get('cacheInfo') ? lStorage.get('cacheInfo') : {}
+        state.projectId = val
+        localStorage.setItem('projectId', val)
+        if (cacheInfo[state.userInfo.userName]) {
+          cacheInfo[state.userInfo.userName].projectId = val
+          lStorage.set('cacheInfo', cacheInfo)
+        } else {
+          cacheInfo[state.userInfo.userName] = {projectId: val}
+          lStorage.set('cacheInfo', cacheInfo)
         }
-    },
-    actions: {
-        loadUserInfo({ state }) {
-            console.log(state)
-            return new Promise((resolve, reject) => {
-                frameworkApi.loadUserInfo().then(resp => {
-                    console.log(resp)
-                    if (resp.Result == 'success') {
-                        state.userInfo = { userName: resp.Username, userId: resp.UserId }
-                        state.userId = resp.UserId
-                        storage.set('user_name', resp.Username)
-                        storage.set('user_id', resp.UserId)
-                        state.permissions = {}
-                        if (resp.Permissions) {
-                            resp.Permissions.forEach(p => (state.permissions[p] = true))
-                        }
-                        state.projects = []
-                        if (resp.Projects) {
-                            if (resp.Projects[0] && resp.Projects[0].ProjId) {
-                                state.projectId = resp.Projects[0].ProjId
-                                state.secret = resp.Projects[0].Secret ? resp.Projects[0].Secret : ""
-                            }
-                            resp.Projects.forEach(proj =>
-                                state.projects.push({
-                                    id: proj.ProjId,
-                                    name: proj.ProjLocalName,
-                                    pwd: proj.Secret ? proj.Secret : ""
-                                })
-                            )
-                        }
-                    } else {
-                        state.userInfo = null
+        storage.set(KEY_PROJECT_SELECTED, val)
+        state.projects.map((item) => {
+          if (item.id == val) {
+            state.secret = item.pwd
+            localStorage.setItem('secret', item.pwd)
+          }
+        })
+      },
+      setUploaderList: (state, val) => {
+        state.uploaderList = val ? val : []
+      },
 
-                    }
-                    resolve(resp)
+    },
+  actions: {
+    setRowEdit(contentx, value) {
+      contentx.commit('setRowEdit', value)
+    },
+    loadUserInfo({state}) {
+      console.log(state)
+      return new Promise((resolve, reject) => {
+        frameworkApi.loadUserInfo().then(resp => {
+          console.log(resp)
+          if (resp.Result == 'success' && resp.UserId) {
+            state.userInfo = {userName: resp.Username, userId: resp.UserId}
+            state.userId = resp.UserId
+            storage.set('user_name', resp.Username)
+            storage.set('user_id', resp.UserId)
+            state.permissions = {}
+            if (resp.Permissions) {
+              resp.Permissions.forEach(p => (state.permissions[p] = true))
+            }
+            state.projects = []
+            if (resp.Projects) {
+              if (resp.Projects[0] && resp.Projects[0].ProjId) {
+                state.projectId = resp.Projects[0].ProjId
+                state.secret = resp.Projects[0].Secret ? resp.Projects[0].Secret : ""
+              }
+              resp.Projects.forEach(proj =>
+                state.projects.push({
+                  id: proj.ProjId,
+                  name: proj.ProjLocalName,
+                  pwd: proj.Secret ? proj.Secret : ""
                 })
-            })
-        },
-        setBreadcrumb: {
-            root: true,
-            handler({ state, commit }, val) {
-                let label = val[0].label;
-                if (label === "消息中心") {
-                    commit("setSidebarSelected", "message"); // 当进入消息中心页面的时候不选中导航栏
-                }
-                state.breadcrumb = []
-                state.breadcrumb = val
-                storage.set(KEY_PAGE_BRANDCRUMB, val)
+              )
             }
+          } else {
+            state.userInfo = null
+
+          }
+          resolve(resp)
+        })
+      })
+    },
+    setBreadcrumb: {
+      root: true,
+      handler({state, commit}, val) {
+        let label = val[0].label;
+        if (label === "消息中心") {
+          commit("setSidebarSelected", "message"); // 当进入消息中心页面的时候不选中导航栏
         }
+        state.breadcrumb = []
+        state.breadcrumb = val
+        storage.set(KEY_PAGE_BRANDCRUMB, val)
+      }
     }
+  }
 }

+ 17 - 2
src/router/system.js

@@ -22,6 +22,8 @@ import repetitionGraphy from '@/views/ready/buildfloor/repetitionGraphy'
 /**模型管理 */
 import modelFile from '@/views/model/file'
 import modelReport from '@/views/model/report'
+import deleted from '@/views/model/report/deleted'
+import supplement from '@/views/model/report/supplement'
 
 /**系统集成 */
 import pointConfig from '@/views/point/config_point'
@@ -69,6 +71,7 @@ import cenotelist from '@/views/ledger/cenotelist' //竖井清单
 import cenoteadd from '@/views/ledger/cenotelist/cenoteadd' //添加竖井
 import cenoteDetail from '@/views/ledger/cenotelist/cenoteDetail' //竖井关系详情
 import rentlist from '@/views/ledger/rentlist' //租户清单
+import manageTenantZone from '@/views/ledger/rentlist/manageTenantZone' //租户清单
 import rentadd from '@/views/ledger/rentlist/rentadd' //租户清单
 import dataReport from '@/views/ledger/report'
 import auth from '@/views/system/auth'
@@ -79,6 +82,7 @@ import relatedSpace from '@/views/ledger/cenotelist/relatedSpace'
 /**  关系维护并计算 */
 import maintain from '@/views/relation/maintain'
 import overView from '@/views/relation/overview'
+import relationDetail from '@/views/relation/overview/detail'
 import data from '@/views/relation/data'
 import datatable from '@/views/relation/datatable'
 
@@ -94,6 +98,7 @@ import integrateResults from '@/views/screen/splitScreen/integrateresults'
 /**  业务空间数据导入工具 */
 import dataUtil from '@/views/business_space/dataUtil/index'
 import dataUtil2 from '@/views/business_space/dataUtil/index2'
+import checkJsonUtil from '@/views/business_space/dataUtil/checkJsonUtil'
 
 /**市场及商务 */
 const OwnerManage = () =>
@@ -118,7 +123,8 @@ export default [{
         component: LayoutMain,
         children: [
             { path: 'index', component: dataUtil },
-            { path: 'index2', component: dataUtil2 }
+            { path: 'index2', component: dataUtil2 },
+            { path: 'checkJsonUtil', component: checkJsonUtil }
         ]
     },
     // 辅助屏
@@ -175,9 +181,11 @@ export default [{
                 name: 'modelReport',
                 component: modelReport,
                 meta: { keepAlive: false, breadcrumbs: [{ label: '模型管理', path: '/model/file' }, { label: '模型质量报告' }] }
-            }
+            },
         ]
     },
+    { path: '/model/report/deleted', name: 'deleted', component: deleted },
+    { path: '/model/report/supplement', name: 'supplement', component: supplement },
     // 系统集成
     {
         path: '/point',
@@ -457,6 +465,12 @@ export default [{
                 meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '租户台账', path: '/ledger/rentlist' }, { label: '添加租户' }] }
             },
             {
+                path: 'manageTenantZone',
+                name: 'manageTenantZone',
+                component: manageTenantZone,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '租户台账', path: '/ledger/rentlist' }, { label: '管理租赁空间' }] }
+            },
+            {
                 path: 'datareport',
                 name: 'dataReport',
                 component: dataReport,
@@ -473,6 +487,7 @@ export default [{
         children: [
             { path: 'maintain', name: 'maintain', component: maintain, meta: { keepAlive: false, breadcrumbs: [{ label: '关系维护' }] } },
             { path: 'overview', name: 'overView', component: overView, meta: { keepAlive: false, breadcrumbs: [{ label: '关系维护计算' },{ label: '全部关系总览' }] } },
+            { path: 'relationDetail', name: 'relationDetail', component: relationDetail, meta: { keepAlive: false, breadcrumbs: [{ label: '关系维护计算' },{ label: '关系详情' }] } },
             { path: 'data', name: 'data', component: data, meta: { keepAlive: false, breadcrumbs: [{ label: '项目数据转换',path:'/relation/data' },{ label: '项目数据转换',path:'/relation/data' }] } },
             { path: 'datatable', name: 'datatable', component: datatable}
             ]

+ 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
+  }
 })

+ 2 - 2
src/utils/handsontable/buildFloorData.js

@@ -42,7 +42,7 @@ const buildFloor = {
       })
       data.unshift({
         value: "",
-        label: "未明确建筑的设备"
+        label: "未明确建筑"
       })
       data.forEach(build => {
         floorData.forEach(floor => {
@@ -56,7 +56,7 @@ const buildFloor = {
               build.children = []
               build.children.push({
                 value: "",
-                label: "未明确楼层的设备"
+                label: "未明确楼层"
               },{
                 value: floor.FloorID,
                 label: floor.FloorLocalName 

+ 4 - 3
src/utils/handsontable/mainText.js

@@ -1,5 +1,6 @@
 const text = {
-
+    // 只读模式 or 编辑模式
+    readOnly: false,
     //图片类型
     picType: (instance, td, row, col, prop, value, cellProperties) => {
         td.style.color = "#409EFF";
@@ -13,7 +14,7 @@ const text = {
             })
             td.innerHTML = "已上传:" + i;
         } else {
-            td.innerHTML = "点击上传"
+            td.innerHTML = text.readOnly?'':'点击上传'
         }
         return td;
     },
@@ -24,7 +25,7 @@ const text = {
         if (value instanceof Array && value.length > 0) {
             td.innerHTML = "已上传:" + value.length;
         } else {
-            td.innerHTML = "点击上传"
+            td.innerHTML = text.readOnly?'':'点击上传'
         }
         return td;
     },

+ 3 - 2
src/utils/handsontable/notShow.js

@@ -933,6 +933,7 @@ const showTools = {
         if (taizhang && !onlyRead) {
             arr = this.arrToArr(arr, showType)
         }
+        text.readOnly = onlyRead;
         let data = arr.map(item => {
             // if (type == "property" && item.FirstTag == "RunParam") { //资产台账不显示运行参数
             //     return undefined
@@ -1052,7 +1053,7 @@ const showTools = {
             return {
                 data: item.Path,
                 type: "date",
-                dateFormat: "YYYY-MM-DD",
+                dateFormat: "YYYYMMDDHHmmss",
                 readOnly: onlyRead,
                 correctFormat: true
             };
@@ -1161,7 +1162,7 @@ const showTools = {
             return {
                 data: item.Path,
                 type: "date",
-                dateFormat: "YYYY-MM-DD",
+                dateFormat: "YYYYMMDDHHmmss",
                 readOnly: !item.Editable,
                 correctFormat: true
             };

+ 426 - 415
src/utils/scan/tools.js

@@ -1,213 +1,277 @@
 import Handsontable from "handsontable-pro"
+
 const tools = {}
 
 let arrX = []
 let arrY = []
 tools.getPointDetails = (arr) => {
-        arr.map(item => {
-            if (item.PointList && item.PointList.length) {
-                item.PointList.map(em => {
-                    arrX.push(em.X)
-                    arrY.push(em.Y)
-                })
-            }
-        })
-    }
-    /**
-     * 
-     * @param {*} obj 将point标签的x,y进行比对
-     * @return object 返回数组,其中包括最大值最小值X,Y 
-     */
-tools.getPoint = function(obj) {
-    arrX = []
-    arrY = []
-    for (let i in obj) {
-        tools.getPointDetails(obj[i])
-    }
-    let maxX = Math.max.apply(null, arrX)
-    let minX = Math.min.apply(null, arrX)
-    let maxY = Math.max.apply(null, arrY)
-    let minY = Math.min.apply(null, arrY)
-    let data = {
-        maxX,
-        minX,
-        maxY,
-        minY
+  arr.map(item => {
+    if (item.PointList && item.PointList.length) {
+      item.PointList.map(em => {
+        arrX.push(em.X)
+        arrY.push(em.Y)
+      })
     }
-    return data
+  })
+}
+/**
+ *
+ * @param {*} obj 将point标签的x,y进行比对
+ * @return object 返回数组,其中包括最大值最小值X,Y
+ */
+tools.getPoint = function (obj) {
+  arrX = []
+  arrY = []
+  for (let i in obj) {
+    tools.getPointDetails(obj[i])
+  }
+  let maxX = Math.max.apply(null, arrX)
+  let minX = Math.min.apply(null, arrX)
+  let maxY = Math.max.apply(null, arrY)
+  let minY = Math.min.apply(null, arrY)
+  let data = {
+    maxX,
+    minX,
+    maxY,
+    minY
+  }
+  return data
 }
 
 /**
- * 
+ *
  * @param {*} array  比较数组1
  * @param {*} array2 比较数组2
- * 
+ *
  * 返回两个数组中不同的元素
  */
-tools.compareArr = function(array, array2) {
-    var arr3 = [];
-    for (key in array) {
-        var stra = array[key];
-        var count = 0;
-        for (var j = 0; j < array2.length; j++) {
-            var strb = array2[j];
-            if (stra == strb) {
-                count++;
-            }
-        }
-        if (count === 0) { //表示数组1的这个值没有重复的,放到arr3列表中  
-            arr3.push(stra);
-        }
+tools.compareArr = function (array, array2) {
+  var arr3 = [];
+  for (key in array) {
+    var stra = array[key];
+    var count = 0;
+    for (var j = 0; j < array2.length; j++) {
+      var strb = array2[j];
+      if (stra == strb) {
+        count++;
+      }
     }
-    return arr3;
+    if (count === 0) { //表示数组1的这个值没有重复的,放到arr3列表中
+      arr3.push(stra);
+    }
+  }
+  return arr3;
 }
 
 /**
- * 
+ *
  * @param {*} arr 需要改变的数组
  * @param {*} k   其中Y值需要变换的倍数
  * @param {*} name arr中的key值
- * 
+ *
  * 返回arr map 后arr[mapIndex]name * k 的数组
  */
-tools.changeMap = function(arr, k, name) {
-    let data = arr.map(items => {
-        if (items[name] && items[name].length) {
-            items[name].map(children => {
-                if (Array.isArray(children)) {
-                    return children.map(res => {
-                        res.Y = res.Y * k
-                        return res
-                    })
-                } else {
-                    children.Y = children.Y * k
-                    return children
-                }
-            })
+tools.changeMap = function (arr, k, name) {
+  let data = arr.map(items => {
+    if (items[name] && items[name].length) {
+      items[name].map(children => {
+        if (Array.isArray(children)) {
+          return children.map(res => {
+            res.Y = res.Y * k
+            return res
+          })
+        } else {
+          children.Y = children.Y * k
+          return children
         }
-    })
-    return data
+      })
+    }
+  })
+  return data
 }
 
-tools.getMouseCanvas = function(view, e) {
-    let bbox = view.canvasView.getBoundingClientRect();
-    let x = e.clientX - bbox.left,
-        y = e.clientY - bbox.top;
-    return view.mapToScene({
-        x: x,
-        y: y
-    });
+tools.getMouseCanvas = function (view, e) {
+  let bbox = view.canvasView.getBoundingClientRect();
+  let x = e.clientX - bbox.left,
+    y = e.clientY - bbox.top;
+  return view.mapToScene({
+    x: x,
+    y: y
+  });
 }
 
 /**
- * 
+ *
  * @param {*} view graphy class
  * @param {*} e    mouse元素e
  */
-tools.mouseInElement = function(view, e, type) {
-    let mouse = tools.getMouseCanvas(view, e),
-        falg = false,
-        items = view.scene.root.children,
-        i = 0,
-        t = type || 3;
-    for (; i < items.length; i++) {
-        if (items[i].type == t) {
-            if (items[i].contains(mouse)) {
-                falg = true
-                break
-            }
-        }
-    }
-    return {
-        falg,
-        item: items[i] || [],
-        index: i
+tools.mouseInElement = function (view, e, type) {
+  let mouse = tools.getMouseCanvas(view, e),
+    falg = false,
+    items = view.scene.root.children,
+    i = 0,
+    t = type || 3;
+  for (; i < items.length; i++) {
+    if (items[i].type == t) {
+      if (items[i].contains(mouse)) {
+        falg = true
+        break
+      }
     }
+  }
+  return {
+    falg,
+    item: items[i] || [],
+    index: i
+  }
 }
 
 /**
- * 
- * @param {graphy中的所有children} items 
- * @param {类型} type 
- * @param {list} codes 
- * @param {item中的code} code 
+ *
+ * @param {graphy中的所有children} items
+ * @param {类型} type
+ * @param {list} codes
+ * @param {item中的code} code
  */
-tools.clear = function(items, type, codes, code) {
-    let indexArr = [];
-    if (items && items.length) {
-        let i = 0;
-        for (i; i < items.length; i++) {
-            let j = 0;
-            for (j; j < codes.length; j++) {
-                if (items[i][type] = type && items[i][code] == codes[j][code]) {
-                    indexArr.push(i)
-                }
-            }
+tools.clear = function (items, type, codes, code) {
+  let indexArr = [];
+  if (items && items.length) {
+    let i = 0;
+    for (i; i < items.length; i++) {
+      let j = 0;
+      for (j; j < codes.length; j++) {
+        if (items[i][type] = type && items[i][code] == codes[j][code]) {
+          indexArr.push(i)
         }
+      }
     }
-    return indexArr
+  }
+  return indexArr
 }
 
-tools.getText = function(arr, name) {
-    let text = '';
-    if (arr && arr.length) {
-        arr.map(item => {
-            text += (!!text ? '、' : '') + item[name]
-        })
-    }
-    return text
+tools.getText = function (arr, name) {
+  let text = '';
+  if (arr && arr.length) {
+    arr.map(item => {
+      text += (!!text ? '、' : '') + item[name]
+    })
+  }
+  return text
 }
 
-tools.cutString = function(string, num, text) {
-    return string.substring(0, num) + '...' + text
+tools.cutString = function (string, num, text) {
+  return string.substring(0, num) + '...' + text
 }
 
-tools.deepCopy = function(obj) {
-    var out = [],
-        i = 0,
-        len = obj.length;
-    for (; i < len; i++) {
-        if (obj[i] instanceof Array) {
-            out[i] = tools.deepCopy(obj[i]);
-        } else out[i] = obj[i];
-    }
-    return out;
+tools.deepCopy = function (obj) {
+  var out = [],
+    i = 0,
+    len = obj.length;
+  for (; i < len; i++) {
+    if (obj[i] instanceof Array) {
+      out[i] = tools.deepCopy(obj[i]);
+    } else out[i] = obj[i];
+  }
+  return out;
 }
 
 tools.copyArr = (source) => {
-    if (!source || typeof source !== 'object') {
-        throw new Error('error arguments', 'shallowClone');
-    }
-    var targetObj = source.constructor === Array ? [] : {};
-    for (var keys in source) {
-        if (source.hasOwnProperty(keys)) {
-            if (source[keys] && typeof source[keys] === 'object') {
-                targetObj[keys] = source[keys].constructor === Array ? [] : {};
-                targetObj[keys] = tools.copyArr(source[keys]);
-            } else {
-                targetObj[keys] = source[keys];
-            }
-        }
+  if (!source || typeof source !== 'object') {
+    throw new Error('error arguments', 'shallowClone');
+  }
+  var targetObj = source.constructor === Array ? [] : {};
+  for (var keys in source) {
+    if (source.hasOwnProperty(keys)) {
+      if (source[keys] && typeof source[keys] === 'object') {
+        targetObj[keys] = source[keys].constructor === Array ? [] : {};
+        targetObj[keys] = tools.copyArr(source[keys]);
+      } else {
+        targetObj[keys] = source[keys];
+      }
     }
-    return targetObj;
+  }
+  return targetObj;
 }
 
-tools.deepCopyObj = function(v) {
-    var o = v.constructor === Array ? [] : {};
-    for (var key in v) {
-        o[key] = typeof v[key] === 'Object' ? tools.deepCopyObj(v[key]) : v[key];
-    }
+tools.deepCopyObj = function (v) {
+  var o = v.constructor === Array ? [] : {};
+  for (var key in v) {
+    o[key] = typeof v[key] === 'Object' ? tools.deepCopyObj(v[key]) : v[key];
+  }
 
-    return o;
+  return o;
 }
 
 tools.deepClone = (obj) => {
-    var proto = Object.getPrototypeOf(obj);
-    return Object.assign({}, Object.create(proto), obj);
+  var proto = Object.getPrototypeOf(obj);
+  return Object.assign({}, Object.create(proto), obj);
 }
 
 //hansontable插件的修改
-tools.customDropdownRenderer = function(
+tools.customDropdownRenderer = function (
+  instance,
+  td,
+  row,
+  col,
+  prop,
+  value,
+  cellProperties
+) {
+  var selectedId;
+  var optionsList = cellProperties.chosenOptions.data;
+  if (
+    typeof optionsList === "undefined" ||
+    typeof optionsList.length === "undefined" ||
+    !optionsList.length
+  ) {
+    Handsontable.renderers.TextRenderer(
+      instance,
+      td,
+      row,
+      col,
+      prop,
+      value,
+      cellProperties
+    );
+    return td;
+  }
+  var values = (value + "").split(",");
+  value = [];
+  for (var index = 0; index < optionsList.length; index++) {
+    if (optionsList[index].content && optionsList[index].content.length) {
+      for (let i = 0; i < optionsList[index].content.length; i++) {
+        if (
+          optionsList[index].content[i] &&
+          optionsList[index].content[i].length
+        ) {
+          for (let j = 0; j < optionsList[index].content[i].length; j++) {
+            if (
+              values.indexOf(
+                optionsList[index].content[i].content[j].Code + ""
+              ) > -1
+            ) {
+              selectedId = optionsList[index].content[i].content[j].Code;
+              value.push(optionsList[index].content[i].content[j].Name);
+            }
+          }
+        } else {
+          if (
+            values.indexOf(optionsList[index].content[i].Code + "") > -1
+          ) {
+            selectedId = optionsList[index].content[i].Code;
+            value.push(optionsList[index].content[i].Name);
+          }
+        }
+      }
+    } else {
+      if (values.indexOf(optionsList[index].Code + "") > -1) {
+        selectedId = optionsList[index].Code;
+        value.push(optionsList[index].Name);
+      }
+    }
+  }
+  value = value.join(", ");
+  Handsontable.renderers.TextRenderer(
     instance,
     td,
     row,
@@ -215,345 +279,292 @@ tools.customDropdownRenderer = function(
     prop,
     value,
     cellProperties
-) {
-    var selectedId;
-    var optionsList = cellProperties.chosenOptions.data;
-    if (
-        typeof optionsList === "undefined" ||
-        typeof optionsList.length === "undefined" ||
-        !optionsList.length
-    ) {
-        Handsontable.renderers.TextRenderer(
-            instance,
-            td,
-            row,
-            col,
-            prop,
-            value,
-            cellProperties
-        );
-        return td;
-    }
-    var values = (value + "").split(",");
-    value = [];
-    for (var index = 0; index < optionsList.length; index++) {
-        if (optionsList[index].content && optionsList[index].content.length) {
-            for (let i = 0; i < optionsList[index].content.length; i++) {
-                if (
-                    optionsList[index].content[i] &&
-                    optionsList[index].content[i].length
-                ) {
-                    for (let j = 0; j < optionsList[index].content[i].length; j++) {
-                        if (
-                            values.indexOf(
-                                optionsList[index].content[i].content[j].Code + ""
-                            ) > -1
-                        ) {
-                            selectedId = optionsList[index].content[i].content[j].Code;
-                            value.push(optionsList[index].content[i].content[j].Name);
-                        }
-                    }
-                } else {
-                    if (
-                        values.indexOf(optionsList[index].content[i].Code + "") > -1
-                    ) {
-                        selectedId = optionsList[index].content[i].Code;
-                        value.push(optionsList[index].content[i].Name);
-                    }
-                }
-            }
-        } else {
-            if (values.indexOf(optionsList[index].Code + "") > -1) {
-                selectedId = optionsList[index].Code;
-                value.push(optionsList[index].Name);
-            }
-        }
-    }
-    value = value.join(", ");
-    Handsontable.renderers.TextRenderer(
-        instance,
-        td,
-        row,
-        col,
-        prop,
-        value,
-        cellProperties
-    );
-    return td;
+  );
+  return td;
 }
 
 
 //hansontable插件查看详情
-tools.lookDetails = function(instance, td, row, col, prop, value, cellProperties) {
-    td.style.color = "#409EFF";
-    td.style.cursor = "pointer";
-    if (!!value) {
-        if (typeof(value) == 'object') {
-            td.innerHTML = "已有值,查看";
-        } else {
-            td.innerHTML = value
-        }
+tools.lookDetails = function (instance, td, row, col, prop, value, cellProperties) {
+  td.style.color = "#409EFF";
+  td.style.cursor = "pointer";
+  if (!!value) {
+    if (typeof (value) == 'object') {
+      td.innerHTML = "已有值,查看";
     } else {
-        td.innerHTML = "查看详情";
+      td.innerHTML = value
     }
-    return td;
+  } else {
+    td.innerHTML = "查看详情";
+  }
+  return td;
 }
 
 //是否关联
-tools.hasRelation = function(instance, td, row, col, prop, value, cellProperties) {
-    if (value) {
-        td.innerHTML = "已关联";
-    } else {
-        td.innerHTML = "未关联";
-    }
-    return td;
+tools.hasRelation = function (instance, td, row, col, prop, value, cellProperties) {
+  if (value) {
+    td.innerHTML = "已关联";
+  } else {
+    td.innerHTML = "未关联";
+  }
+  return td;
 }
 
 //关联的资产
-tools.LinkEquipLocalName = function(instance, td, row, col, prop, value, cellProperties) {
-    if (value) {
-        td.innerHTML = value;
-    } else {
-        td.innerHTML = instance.getDataAtRowProp(row,'LinkEquipName');
-    }
-    return td;
+tools.LinkEquipLocalName = function (instance, td, row, col, prop, value, cellProperties) {
+  if (value) {
+    td.innerHTML = value;
+  } else {
+    td.innerHTML = instance.getDataAtRowProp(row, 'LinkEquipName');
+  }
+  return td;
 }
 
-tools.num = function(instance, td, row, col, prop, value, cellProperties) {
-    td.style.color = "#409EFF";
-    td.style.cursor = "pointer";
-    td.innerHTML = value;
-    return td;
+tools.num = function (instance, td, row, col, prop, value, cellProperties) {
+  td.style.color = "#409EFF";
+  td.style.cursor = "pointer";
+  td.innerHTML = value;
+  return td;
 }
 
 tools.setItem = (key, value) => {
-    if (typeof value == 'string') {
-        localStorage.setItem(key, value);
-    } else {
-        localStorage.setItem(key, JSON.stringify(value));
-    }
+  if (typeof value == 'string') {
+    localStorage.setItem(key, value);
+  } else {
+    localStorage.setItem(key, JSON.stringify(value));
+  }
 }
 
 tools.getItem = (key) => {
-    const re = /^\[|\{|\}|\]$/g //判断字符中是否有[]{}
-    let getIt = localStorage.getItem(key)
-    if (re.test(getIt)) {
-        return JSON.parse(getIt)
-    } else {
-        return getIt
-    }
+  const re = /^\[|\{|\}|\]$/g //判断字符中是否有[]{}
+  let getIt = localStorage.getItem(key)
+  if (re.test(getIt)) {
+    return JSON.parse(getIt)
+  } else {
+    return getIt
+  }
 }
 
 tools.removeItem = (key) => {
-    localStorage.removeItem(key)
+  localStorage.removeItem(key)
 }
 
 //取两个数组的差值
 tools.differenceArr = (a, b) => {
-    return a.concat(b).filter(v => !a.includes(v) || !b.includes(v))
+  return a.concat(b).filter(v => !a.includes(v) || !b.includes(v))
 }
 
 //取两个数组的相同值
 tools.sameArr = (a, b) => {
-    return a.filter(v => b.includes(v))
+  return a.filter(v => b.includes(v))
 }
 
 tools.sortArr = (arr, key, sequence) => {
-    function compare(property) {
-        return function(a, b) {
-            var value1 = a[property];
-            var value2 = b[property];
-            if (sequence) {
-                return value1 - value2;
-            } else {
-                return value2 - value1
-            }
-        }
+  function compare(property) {
+    return function (a, b) {
+      var value1 = a[property];
+      var value2 = b[property];
+      if (sequence) {
+        return value1 - value2;
+      } else {
+        return value2 - value1
+      }
     }
+  }
 
-    return arr.sort(compare(key))
+  return arr.sort(compare(key))
 }
 
 tools.pagination = (pageNo, pageSize, array) => {
-    let offset = (pageNo - 1) * pageSize;
-    return offset + pageSize >= array.length ?
-        array.slice(offset, array.length) :
-        array.slice(offset, offset + pageSize);
+  let offset = (pageNo - 1) * pageSize;
+  return offset + pageSize >= array.length ?
+    array.slice(offset, array.length) :
+    array.slice(offset, offset + pageSize);
 }
 
 tools.getSameItems = (arr1, key1, arr2, key2) => {
-    let data = []
-    arr1.map(item => {
-        arr2.map(child => {
-            if (item[key1] == child[key2]) {
-                data.push(item)
-            }
-        })
+  let data = []
+  arr1.map(item => {
+    arr2.map(child => {
+      if (item[key1] == child[key2]) {
+        data.push(item)
+      }
     })
-    return data
+  })
+  return data
 }
 
 tools.isIn = (x, y, json) => {
-    let nCross = 0,
-        point = typeof(x) == 'object' ? [x.x, x.y] : [x, y],
-        APoints = json,
-        length = APoints.length,
-        p1, p2, i, xinters;
-    p1 = APoints[0];
-    for (i = 1; i <= length; i++) {
-        p2 = APoints[i % length];
-        if (
-            point[0] > Math.min(p1[0], p2[0]) &&
-            point[0] <= Math.max(p1[0], p2[0])
-        ) {
-            if (point[1] <= Math.max(p1[1], p2[1])) {
-                if (p1[0] != p2[0]) {
-                    //计算位置信息
-                    xinters = (point[0] - p1[0]) * (p2[1] - p1[1]) / (p2[0] - p1[0]) + p1[1];
-                    if (p1[1] == p2[1] || point[1] <= xinters) {
-                        nCross++
-                    }
-                }
-            }
+  let nCross = 0,
+    point = typeof (x) == 'object' ? [x.x, x.y] : [x, y],
+    APoints = json,
+    length = APoints.length,
+    p1, p2, i, xinters;
+  p1 = APoints[0];
+  for (i = 1; i <= length; i++) {
+    p2 = APoints[i % length];
+    if (
+      point[0] > Math.min(p1[0], p2[0]) &&
+      point[0] <= Math.max(p1[0], p2[0])
+    ) {
+      if (point[1] <= Math.max(p1[1], p2[1])) {
+        if (p1[0] != p2[0]) {
+          //计算位置信息
+          xinters = (point[0] - p1[0]) * (p2[1] - p1[1]) / (p2[0] - p1[0]) + p1[1];
+          if (p1[1] == p2[1] || point[1] <= xinters) {
+            nCross++
+          }
         }
-        p1 = p2;
-    }
-    if (nCross % 2 == 0) {
-        return false
-    } else {
-        return true
+      }
     }
+    p1 = p2;
+  }
+  if (nCross % 2 == 0) {
+    return false
+  } else {
+    return true
+  }
 
 }
 
 tools.arrayUnique = (arr, name) => {
-    var hash = {};
-    return arr.reduce(function(item, next) {
-        hash[next[name]] ? '' : hash[next[name]] = true && item.push(next);
-        return item;
-    }, []);
-}
-
-tools.dateAddYear = function(date, yearCount) {
-    var tempDate = dateToDate(date);
-    var count = parseInt(yearCount);
-    var oldYear = tempDate.getFullYear();
-    var oldMonth = tempDate.getMonth();
-    var oldDate = tempDate.getDate();
-    var newYear = oldYear + count;
-    var newDate = new Date(newYear, oldMonth, oldDate);
-    //防止月份数不一致,进行微调
-    while (newDate.getMonth() != oldMonth) {
-        oldDate--;
-        newDate = new Date(newYear, oldMonth, oldDate);
-    }
-    var month = newDate.getMonth() + 1;
-    var day = newDate.getDate();
-    month = (month.toString().length == 1) ? ("0" + month) : month;
-    day = (day.toString().length == 1) ? ("0" + day) : day;
-
-    var result = newDate.getFullYear() + '-' + month + '-' + day; //当前日期
-
-    return result;
-}
-
-tools.formatDataSource = function(data) {
-    let options
+  var hash = {};
+  return arr.reduce(function (item, next) {
+    hash[next[name]] ? '' : hash[next[name]] = true && item.push(next);
+    return item;
+  }, []);
+}
+
+tools.dateAddYear = function (date, yearCount) {
+  var tempDate = dateToDate(date);
+  var count = parseInt(yearCount);
+  var oldYear = tempDate.getFullYear();
+  var oldMonth = tempDate.getMonth();
+  var oldDate = tempDate.getDate();
+  var newYear = oldYear + count;
+  var newDate = new Date(newYear, oldMonth, oldDate);
+  //防止月份数不一致,进行微调
+  while (newDate.getMonth() != oldMonth) {
+    oldDate--;
+    newDate = new Date(newYear, oldMonth, oldDate);
+  }
+  var month = newDate.getMonth() + 1;
+  var day = newDate.getDate();
+  month = (month.toString().length == 1) ? ("0" + month) : month;
+  day = (day.toString().length == 1) ? ("0" + day) : day;
+
+  var result = newDate.getFullYear() + '-' + month + '-' + day; //当前日期
+
+  return result;
+}
+tools.formatDate = (now) => {
+  let year = now.getFullYear();
+  let month = now.getMonth() + 1;
+  let date = now.getDate();
+  let hour = now.getHours();
+  let minute = now.getMinutes();
+  let second = now.getSeconds();
+  return year + "-" + month + "-" + (date > 10 ? date : '0' + date) + " " + hour + ":" + (minute > 10 ? minute : '0' + minute) + ":" + (second > 10 ? second : '0' + second);
+};
+tools.formatDataSource = function (data) {
+  let options
+  let arr = []
+
+  function recursion(data) {
     let arr = []
-    function recursion (data) {
-        let arr = []
-        data.map((item) =>{
-            if (item.Code && item.Name)
-            arr.push({ Code: item.Code, Name: item.Name })
-            if (item.Content && item.Content.length)
-            arr = arr.concat(recursion(item.Content))
-        })
-        return arr
-    }
-    try{
-        options = JSON.parse(data)
-        if(options) {
-            return recursion(options)
-        } else {
-            return arr
-        }
-    } catch (err) {
-        return arr
+    data.map((item) => {
+      if (item.Code && item.Name)
+        arr.push({Code: item.Code, Name: item.Name})
+      if (item.Content && item.Content.length)
+        arr = arr.concat(recursion(item.Content))
+    })
+    return arr
+  }
+
+  try {
+    options = JSON.parse(data)
+    if (options) {
+      return recursion(options)
+    } else {
+      return arr
     }
+  } catch (err) {
+    return arr
+  }
 }
 
 tools.isObjectValueEqual = function (a, b) {//判断两个对象的可枚举属性值是否相等(认为null,"",undefinde相等)
-    //取对象a和b的属性名
-    var aProps = Object.keys(a)
-    var bProps = Object.keys(b)
-    //判断属性名的length是否一致
-    if (aProps.length != bProps.length) {
+  //取对象a和b的属性名
+  var aProps = Object.keys(a)
+  var bProps = Object.keys(b)
+  //判断属性名的length是否一致
+  if (aProps.length != bProps.length) {
+    return false
+  }
+
+  //循环取出属性名,再判断属性值是否一致
+  for (var i = 0; i < aProps.length; i++) {
+    var propName = aProps[i]
+    if (!(a[propName] instanceof Object || b[propName] instanceof Object)) {
+      if (!(a[propName] == b[propName] || (!a[propName] && !b[propName]))) {
         return false
+      }
+    } else {
+      if (!tools.isObjectValueEqual(a[propName], b[propName])) {
+        return false
+      }
     }
-
-    //循环取出属性名,再判断属性值是否一致
-    for (var i = 0; i < aProps.length; i++) {
-        var propName = aProps[i]
-        if(!(a[propName] instanceof Object || b[propName] instanceof Object)) {
-            if (!(a[propName] == b[propName] || (!a[propName] && !b[propName]))) {
-                return false
-            }
-        } else {
-            if(!tools.isObjectValueEqual(a[propName],b[propName])) {
-                return false
-            }
-        }
-    }
-    return true
+  }
+  return true
 
 }
 
 tools.dataForKey = function (data, key) {
-    let arr = key.split(".")
-    if (arr && arr[0]) {
-      for (let i = 0; i < arr.length; i++) {
-        if (arr[i] && data[arr[i]]) {
-            data = data[arr[i]]
-        } else {
-            return ''
-        }
+  let arr = key.split(".")
+  if (arr && arr[0]) {
+    for (let i = 0; i < arr.length; i++) {
+      if (arr[i] && data[arr[i]]) {
+        data = data[arr[i]]
+      } else {
+        return ''
       }
-      return data
     }
+    return data
+  }
 }
 
 tools.setDataForKey = function (data, key, value) {
-    let arr = key.split(".")
-    if (arr && arr[0]) {
-      for (let i = 0; i < arr.length; i++) {
-        if (!(arr[i] && data[arr[i]])) {
-            data[arr[i]] = {}
+  let arr = key.split(".")
+  if (arr && arr[0]) {
+    for (let i = 0; i < arr.length; i++) {
+      if (!(arr[i] && data[arr[i]])) {
+        data[arr[i]] = {}
+      }
+      if (value !== undefined) {
+        if (i == arr.length - 1) {
+          data[arr[i]] = value
         }
-        if (value !== undefined) {
-            if (i == arr.length - 1) {
-                data[arr[i]] = value
-            }
-        } else {
-            if (i == arr.length - 1) {
-                data[arr[i]] = ''
-            }
+      } else {
+        if (i == arr.length - 1) {
+          data[arr[i]] = ''
         }
-        data = data[arr[i]]
       }
+      data = data[arr[i]]
     }
+  }
 }
 
 function dateToDate(date) {
-    var sDate = new Date();
-    if (typeof date == 'object' && typeof new Date().getMonth == "function") {
-        sDate = date;
-    } else if (typeof date == "string") {
-        var arr = date.split('-');
-        if (arr.length == 3) {
-            sDate = new Date(arr[0] + '-' + arr[1] + '-' + arr[2]);
-        }
+  var sDate = new Date();
+  if (typeof date == 'object' && typeof new Date().getMonth == "function") {
+    sDate = date;
+  } else if (typeof date == "string") {
+    var arr = date.split('-');
+    if (arr.length == 3) {
+      sDate = new Date(arr[0] + '-' + arr[1] + '-' + arr[2]);
     }
-    return sDate;
+  }
+  return sDate;
 }
 
 export default tools

+ 255 - 0
src/views/business_space/dataUtil/checkJsonUtil.vue

@@ -0,0 +1,255 @@
+<template>
+  <el-container>
+    <el-aside width="200px" class="el-scrollbar">
+      <div style="height: 300px;">
+        <el-input type="textarea" v-model="ModelID" placeholder='输入业务空间轮廓线,三维数组,X,Y,Z均为大写;或者模型ID' style="height: 100%;"></el-input>
+      </div>
+      <div title="上传json文件">
+        <el-button size="mini" @click="clickInputFile" icon="el-icon-upload"></el-button>
+        <input type="file" @change="filechange" ref="file">
+      </div>
+      <div title="适配底图">
+        <el-button size="mini" @click="fitClick" icon="el-icon-crop"></el-button>
+      </div>
+      <div title="切割">
+        <el-button size="mini" @click="cut" icon="el-icon-edit"></el-button>
+      </div>
+      <div title="清除">
+        <el-button size="mini" @click="clear" icon="el-icon-refresh-left"></el-button>
+      </div>
+      <div title="定位">
+        <el-button size="mini" @click="location" icon="el-icon-position"></el-button>
+      </div>
+      <div title="开启/关闭吸附">
+        <el-button size="mini" @click="absorb" icon="el-icon-price-tag"></el-button>
+      </div>
+      <div title="矩形选择">
+        <el-button size="mini" @click="rectSelection" icon="el-icon-mouse"></el-button>
+      </div>
+      <div title="通过模型ID生成平面图">
+        <el-button size="mini" icon="el-icon-s-promotion" @click="modelChange"></el-button>
+      </div>
+      <div title="通过轮廓线生成业务空间">
+        <el-button size="mini" @click="showOutline" icon="el-icon-magic-stick"></el-button>
+      </div>
+      <div title="打印">
+        <el-button size="mini" @click="console" icon="el-icon-printer"></el-button>
+      </div>
+    </el-aside>
+    <el-main>
+      <div ref="graphy" v-loading="loading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading"
+        element-loading-background="rgba(0, 0, 0, 0.8)" style="height: 100%">
+        <canvas id="bg" :width="canvasWidth" :height="canvasHeight" ref="canvas" tabindex="0"></canvas>
+      </div>
+    </el-main>
+  </el-container>
+</template>
+<script>
+
+import { SGraphyScene } from "@saga-web/graphy/lib/";
+import { DivideFloorScene, LocationPointScene } from "@saga-web/cad-engine/lib";
+import { FloorView } from "@saga-web/cad-engine/lib/FloorView";
+export default {
+  data() {
+    return {
+      view: null,
+      scene: null,
+      flag: undefined,
+      show: true,
+      loading: false,
+      canvasWidth: 800,
+      canvasHeight: 800,
+      ModelID: "4cea832a217c11ea962ac576d98e7540"
+    }
+  },
+  mounted() {
+    this.canvasWidth = this.$refs.graphy.offsetWidth;
+    this.canvasHeight = this.$refs.graphy.offsetHeight;
+    this.createGraphy();
+    document.onkeydown = E => {
+      console.log(E)
+    }
+    window.onresize = () => {
+      this.canvasWidth = this.$refs.graphy.offsetWidth;
+      this.canvasHeight = this.$refs.graphy.offsetHeight;
+    }
+  },
+  beforeCreate() {
+    // 读取文件
+    FileReader.prototype.reading = function ({ encode } = pms) {
+      let bytes = new Uint8Array(this.result);    //无符号整型数组
+      let text = new TextDecoder(encode || 'UTF-8').decode(bytes);
+      return text;
+    };
+    /* 重写readAsBinaryString函数 */
+    FileReader.prototype.readAsBinaryString = function (f) {
+      if (!this.onload)       //如果this未重写onload函数,则创建一个公共处理方式
+        this.onload = e => {  //在this.onload函数中,完成公共处理
+          let rs = this.reading();
+          console.log(rs);
+        };
+      this.readAsArrayBuffer(f);  //内部会回调this.onload方法
+    };
+  },
+  methods: {
+    createGraphy() {
+      let that = this;
+      // this.disableRightButton()
+      this.clearGraphy()
+      that.scene = new DivideFloorScene();
+      this.loading = true;
+      that.scene.getFloorData('/modelapi/base-graph/query', { ModelId: this.ModelID }).then(res => {
+        if (res.Result == 'failure') {
+          this.$message.warning(res.Message)
+        }
+        console.log(res)
+        that.view.scene = that.scene;
+        that.view.fitSceneToView();
+        this.loading = false;
+      }).catch(err => {
+        console.log(err)
+      })
+    },
+    // 清除canvas
+    clearGraphy() {
+      if (this.view) {
+        this.view.scene = null;
+        return
+      }
+      this.view = new FloorView('bg')
+    },
+    fitClick() {
+      this.view.fitSceneToView();
+    },
+    showSpace() {
+      this.show = !this.show
+      // this.scene.isShowDoor = this.show
+      // this.scene.isShowSpace = this.show
+      this.scene.spaceList.map(t => {
+        if (!t.selected) {
+          t.visible = false;
+        }
+      })
+      this.scene.isShowColumn = this.show
+      // Opt.spaceColor = new SColor(100,100,100,100);
+    },
+    disableRightButton() {
+      this.$refs.canvas.addEventListener('contextmenu', (e) => {
+        console.log(e)
+        e.preventDefault();
+      })
+      this.scene.isShowSpace = false
+    },
+    cut() {
+      this.scene.isMarking = true;
+      console.log(this.scene)
+    },
+    console() {
+      console.log(this.scene.getSelectedSpaces())
+      this.scene.isShowColumn = false
+      this.scene.isShowWall = false
+    },
+    clear() {
+      this.scene.clearSceneMark()
+    },
+    location() {
+      // console.log(this)
+      this.view.fitSelectedToView()
+    },
+    move() {
+      this.view.isMoving = !this.view.isMoving;
+    },
+    absorb() {
+      this.scene.isAbsorbing = !this.scene.isAbsorbing;
+    },
+    rectSelection() {
+      this.scene.isRectSelection = 1;
+      console.log(this.scene)
+    },
+    showOutline() {
+      try {
+        let outline = JSON.parse(this.ModelID)
+        console.log(outline)
+        let obj = {
+          RoomLocalName: '哈哈哈哈',
+          OutLine: outline,
+          RoomID: 12312,
+          Color: "#006bd6",
+          Height: 5000,
+          HeightLightFlag: true
+        }
+        this.scene.removeAllZone()
+        this.scene.addZone(obj);
+        this.scene.zoneList[0].selected = true;
+        this.view.fitSelectedToView();
+      } catch (err) {
+        alert('格式不正确')
+      }
+    },
+    filechange(e) {
+      let file = e.target.files[0]
+      this.read(file)
+    },
+    read(f) {
+      let rd = new FileReader();
+      this.loading = true;
+      rd.onload = e => {
+        //this.readAsArrayBuffer函数内,会回调this.onload函数。在这里处理结果
+        let cont = rd.reading({ encode: 'UTF-8' });
+        let res = JSON.parse(cont);
+        this.JSON = res;
+        this.loadRes()
+      };
+      rd.readAsBinaryString(f);
+    },
+    loadRes() {
+      if (this.JSON) {
+        this.view.scene = null;
+        this.scene = new DivideFloorScene();
+        this.scene.addBaseMapItem(this.JSON.EntityList[0].Elements)
+        this.view.scene = this.scene;
+        console.log(this.scene)
+        this.view.fitSceneToView();
+      }
+      this.loading = false;
+    },
+    modelChange() {
+      console.log(this.ModelID)
+      this.createGraphy();
+    },
+    clickInputFile() {
+      this.$refs.file.click()
+    },
+  },
+}
+</script>
+<style lang="less" scoped>
+.el-container {
+  background: #fff;
+
+  /deep/ textarea.el-textarea__inner {
+    width: 100%;
+    height: 100% !important;
+  }
+
+  .el-aside {
+    padding: 10px;
+    border: 1px solid #e4e4e4;
+  }
+
+  .el-aside > div {
+    margin: 10px auto;
+    text-align: right;
+  }
+
+  .el-main {
+    padding: 10px !important;
+    border: 1px solid #e4e4e4;
+    border-left: none;
+  }
+
+  input[type="file"] {
+    display: none;
+  }
+}
+</style>

+ 83 - 23
src/views/business_space/dataUtil/index2.vue

@@ -1,7 +1,15 @@
 <template>
   <div class="main-box">
     <div class="saga-build-mess">
-      <el-button @click="queryZone">导入业务空间BIMLocation</el-button>
+      <h4>接口基于数据中心,数据更改基于已创建业务空间本身数据计算而得,有轮廓线即可写入BIMLocation,处理单位是毫米的高度为米</h4>
+      <el-checkbox-group v-model="checkTypeList">
+        <el-checkbox v-for="item in tabsList" :label="item.Code" :key="item.Rel_type">{{item.Name}}</el-checkbox>
+      </el-checkbox-group>
+      <el-checkbox-group v-model="checkDataList">
+        <el-checkbox label="BIMLocation">根据业务空间轮廓线计算得</el-checkbox>
+        <el-checkbox label="Height">根据<b>业务空间或元空间</b>本身高度超过100,则/1000(如果本身没有高度或小于100不会处理)</el-checkbox>
+      </el-checkbox-group>
+      <el-button @click="queryZone">导入业务空间选中的数据</el-button>
     </div>
   </div>
 </template>
@@ -77,8 +85,32 @@ export default {
           "Name": '功能分区',
           'Rel_type': '11',
           "Code": 'FunctionZone'
-        }
+        },
+        {
+          "Name": '元空间',
+          "Code": 'Ispace',
+          "Rel_type": '--'
+        },
       ],
+      checkDataList: ['BIMLocation'],
+      checkTypeList: ['GeneralZone', 'PowerSupplyZone', 'LightingZone', 'NetworkZone', 'AirConditioningZone', 'HeatingZone', 'CleanZone', 'DomesticWaterSupplyZone', 'FireZone', 'SecurityZone', 'TenantZone', 'FunctionZone'],
+      codeToName: {
+        GeneralZone: '默认分区',
+        PowerSupplyZone: '供电分区',
+        LightingZone: '照明分区',
+        NetworkZone: '网络分区',
+        AirConditioningZone: '空调分区',
+        HeatingZone: '采暖分区',
+        CleanZone: '洁净分区',
+        DomesticWaterSupplyZone: '生活给水分区',
+        FireZone: '防火分区',
+        SecurityZone: '安防分区',
+        TenantZone: '租户分区',
+        FunctionZone: '功能分区',
+        Ispace: '元空间',
+      },
+      checkAll: false,
+      isIndeterminate: true
     }
   },
   computed: {
@@ -88,8 +120,8 @@ export default {
     init() { },
     // 查询该项目下所有的业务空间
     queryZone() {
-      this.tabsList.map(t => {
-        this.getZone(t.Code, 1, t.Name);
+      this.checkTypeList.map(t => {
+        this.getZone(t, 1, this.codeToName[t]);
       })
     },
     getZone(Code, PageNumber, Name) {
@@ -107,30 +139,58 @@ export default {
           console.log(num)
           this.getZone(Code, num, Name)
         }
-        let params = {
-          data: {
-            Content: [],
-            Projection: ["BIMLocation"]
-          },
-          zone: Code
-        }
-        res.Content.map(t => {
-          if (t.Outline && t.Outline[0]) {
-            t.BIMLocation = this.getAverageVal(t.Outline);
-            let obj = {
-              RoomID: t.RoomID,
-              BIMLocation: t.BIMLocation
+        // 更新BIMLocation
+        if (this.checkDataList.indexOf("BIMLocation") > -1) {
+          let params = {
+            data: {
+              Content: [],
+              Projection: ["BIMLocation"]
+            },
+            zone: Code
+          }
+          res.Content.map(t => {
+            if (t.Outline && t.Outline[0]) {
+              t.BIMLocation = this.getAverageVal(t.Outline);
+              let obj = {
+                RoomID: t.RoomID,
+                BIMLocation: t.BIMLocation
+              }
+              params.data.Content.push(obj);
             }
-            params.data.Content.push(obj);
+          });
+          this.updateZoneData(params, Name)
+        }
+
+        // 更新业务空间Height
+        if (this.checkDataList.indexOf("Height") > -1) {
+          let params2 = {
+            data: {
+              Content: [],
+              Projection: ["Height"]
+            },
+            zone: Code
           }
-        });
-        if (params.data.Content.length) {
-          updateZone(params, res => {
-            console.log(`${this.projectId},${Name},${params.data.Content.length}条更新完成`);
-          })
+          res.Content.map(t => {
+            if (t.Height && t.Height > 100) {
+              t.Height = (t.Height / 1000).toFixed(2);
+              let obj = {
+                RoomID: t.RoomID,
+                Height: t.Height
+              }
+              params2.data.Content.push(obj);
+            }
+          });
+          this.updateZoneData(params2, Name)
         }
       })
     },
+    updateZoneData(param, Name) {
+      if (param.data.Content.length) {
+        updateZone(param, res => {
+          console.log(`${this.projectId},${Name},${param.data.Projection.toString()},${param.data.Content.length}条更新完成`);
+        })
+      }
+    },
     getAverageVal(Outline) {
       let X = 0, Y = 0, Z = 0, len = 0;
       Outline.map(t => {

+ 118 - 99
src/views/data_admin/buildAssets/index.vue

@@ -1,6 +1,24 @@
 <template>
-    <div class='box'>
-        <div class='condition'>
+  <div class='box'>
+    <el-row style="padding:0 10px;margin-bottom:10px;">
+      <div style="float:left;">
+        <label>选择时间范围 : </label>
+        <el-date-picker v-model="value" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
+        </el-date-picker>
+      </div>
+      <div style="float:left;margin-left:10px;">
+        <label>发现问题:</label>
+        <span>无</span>
+      </div>
+      <el-button style="float:right;" :disabled="true">查看收集到的问题</el-button>
+    </el-row>
+    <div style="background:#fff;display:flex;align-items:center;border: 1px solid #e4e4e4;justify-content:center;height:100%;">
+      <div class="center">
+        <i class="icon-wushuju iconfont"></i>
+        暂无数据
+      </div>
+    </div>
+    <!-- <div class='condition'>
             <p>
                 <span style="margin-right: 12px">建筑名称</span>
                 <el-select v-model='buildVlaue' placeholder='请选择'>
@@ -26,8 +44,8 @@
             <el-tab-pane label='未扫楼验证的资产' name='fourth'>
                 <saga-verify :buildVlaue='buildVlaue' :floorsObj='floorsObj' :allEquipObj='allEquipObj'></saga-verify>
             </el-tab-pane>
-        </el-tabs>
-    </div>
+        </el-tabs> -->
+  </div>
 </template>
 
 <script>
@@ -38,116 +56,117 @@ import SagaVerify from './Noverify'
 import { mapGetters } from 'vuex'
 //api
 import {
-    getBuildSelect, //根据项目ID获得建筑列表
-    getAllbusiness,
-    getAllFamily
+  getBuildSelect, //根据项目ID获得建筑列表
+  getAllbusiness,
+  getAllFamily
 } from '@/api/scan/request'
 export default {
-    name: 'build-assets',
-    data() {
-        return {
-            activeName: 'first',
-            buildVlaue: '',
-            options: [],
-            floorsObj: {},
-            allFamilyObj: {}, 
-            allEquipObj: {}
+  name: 'build-assets',
+  data() {
+    return {
+      activeName: 'first',
+      buildVlaue: '',
+      options: [],
+      floorsObj: {},
+      allFamilyObj: {},
+      allEquipObj: {},
+      value: '',//
+    }
+  },
+  computed: {
+    ...mapGetters('layout', ['projectId', 'userId', 'secret'])
+  },
+  components: {
+    SagaNofind,
+    SagaNopaint,
+    SagaNomap,
+    SagaVerify
+  },
+  methods: {
+    handleClick() { },
+    //获取建筑列表
+    getBuilding() {
+      let param = {
+        ProjId: this.projectId,
+        UserId: this.userId
+      }
+      getBuildSelect(param).then(res => {
+        if (res.data.Result == 'success') {
+          let data = res.data.BuildList
+          this.options = data
+          this.buildVlaue = data.length ? data[0].BuildId : ''
         }
+      })
     },
-    computed: {
-        ...mapGetters('layout', ['projectId', 'userId', 'secret'])
-    },
-    components: {
-        SagaNofind,
-        SagaNopaint,
-        SagaNomap,
-        SagaVerify
-    },
-    methods: {
-        handleClick() {},
-        //获取建筑列表
-        getBuilding() {
-            let param = {
-                ProjId: this.projectId,
-                UserId: this.userId
-            }
-            getBuildSelect(param).then(res => {
-                if (res.data.Result == 'success') {
-                    let data = res.data.BuildList
-                    this.options = data
-                    this.buildVlaue = data.length ? data[0].BuildId : ''
-                }
-            })
-        },
-        //获取所有楼层
-        getFloors() {
-            let param = {
-                ProjId: this.projectId,
-                secret: this.secret,
-                id: this.projectId,
-                type: ['Fl']
-            }
-            getAllbusiness(param).then(res => {
-                if (res.data.Result == 'success') {
-                    res.data.Content.forEach(item => {                        
-                        this.floorsObj[item.infos.FloorID] = item.infos.FloorLocalName
-                    })
+    //获取所有楼层
+    getFloors() {
+      let param = {
+        ProjId: this.projectId,
+        secret: this.secret,
+        id: this.projectId,
+        type: ['Fl']
+      }
+      getAllbusiness(param).then(res => {
+        if (res.data.Result == 'success') {
+          res.data.Content.forEach(item => {
+            this.floorsObj[item.infos.FloorID] = item.infos.FloorLocalName
+          })
 
-                }
-            })
-        },
-        //获取设备组
-        getAllFamily() {
-            getAllFamily().then(result => {
-                    if (result.data.Result == "success") {
-                        console.log(result.data.Content)
-                        let list = result.data.Content;
-                        list.forEach(ele => {
-                            this.allFamilyObj[ele.code] = ele
-                        })  
-                        this.allEquipObj = {}
-                        this.getEquip(list)              
-                    }
-                });
-        },
-        getEquip(list) {
-            list.forEach(ele => {
-                if(ele.content) {
-                    ele.content.forEach(keng => {
-                        this.allEquipObj[keng.code] = keng.name
-                    })
-                }
-            })
-        },
-        async init() {
-            await this.getAllFamily();
-            await this.getFloors();
-            await this.getBuilding()
         }
+      })
     },
-    created() {
-        this.init()
+    //获取设备组
+    getAllFamily() {
+      getAllFamily().then(result => {
+        if (result.data.Result == "success") {
+          console.log(result.data.Content)
+          let list = result.data.Content;
+          list.forEach(ele => {
+            this.allFamilyObj[ele.code] = ele
+          })
+          this.allEquipObj = {}
+          this.getEquip(list)
+        }
+      });
     },
-    watch: {
-        projectId(){
-            this.init()
+    getEquip(list) {
+      list.forEach(ele => {
+        if (ele.content) {
+          ele.content.forEach(keng => {
+            this.allEquipObj[keng.code] = keng.name
+          })
         }
+      })
+    },
+    async init() {
+      await this.getAllFamily();
+      await this.getFloors();
+      await this.getBuilding()
+    }
+  },
+  created() {
+    this.init()
+  },
+  watch: {
+    projectId() {
+      this.init()
     }
+  }
 }
 </script>
 
 <style scoped lang='less'>
 .box {
-    .condition {
-        padding: 10px;
-        display: flex;
-        border: 1px solid #dfe6ec;
-        background:#fff;
-        margin-bottom: 10px;
-    }
-    /deep/ .el-tabs__nav{
-        margin-left: 10px;
-    }
+  .condition {
+    padding: 10px;
+    display: flex;
+    border: 1px solid #dfe6ec;
+    background: #fff;
+    margin-bottom: 10px;
+  }
+  /deep/ .el-tabs__nav {
+    margin-left: 10px;
+  }
 }
 </style>
 

+ 1 - 1
src/views/data_admin/buildGraphy/graphyTabs.vue

@@ -315,7 +315,7 @@ export default {
       this.videoPic = [];
       this.elsePic = [];
       imgArr.map((item, index) => {
-        switch (item.name) {
+        switch (item.Name) {
           case "安装位置":
             this.installPic.push(item);
             break;

+ 3 - 0
src/views/data_admin/buildTask/addTask/addDeviceTask.vue

@@ -92,6 +92,9 @@ export default {
       options: [{//方案
         value: '1',
         label: '标准'
+      }, {
+        value: '2',
+        label: '极简'
       }],
       tableData: [],
       multipleSelection:[],

+ 1 - 0
src/views/data_admin/buildTask/addTask/addModelTask.vue

@@ -83,6 +83,7 @@ export default {
         this.modelFolderName = item.label
         let data = {
           FolderId: val,
+          Status: '4',
           ProjectId: this.projectId
         };
         request.queryFloorList(data, res => {

+ 1 - 1
src/views/data_admin/buildTask/index.vue

@@ -2,7 +2,7 @@
 	<div>
 		<task-statistics></task-statistics>
 		<div class="hanson-bar">
-			<el-cascader v-model="taskTypes" :options="taskTypeList" filterable @change="handleChangeTask"></el-cascader>
+			<el-cascader v-model="taskTypes" :options="taskTypeList" filterable @change="handleChangeTask" style="width:240px;"></el-cascader>
 			<el-divider direction="vertical"></el-divider>
 			<div class="condition-list">
 				<floor-cascader  v-show="taskType == 'device' || taskType == 'assets'" :isWidth="false" @change="changeFloor"></floor-cascader>

+ 0 - 0
src/views/ledger/cenotelist/relatedSpace.vue


Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini