Browse Source

Merge branch 'dev' into apiupdate

# Conflicts:
#	config/dev.env.js
#	config/index.js
#	package.json
#	src/api/scan/request.js
#	src/components/data_admin/buildTask/draw/drawModel.vue
#	src/views/data_admin/buildAssets/Station.vue
#	src/views/data_admin/buildAssets/index.vue
#	src/views/data_admin/buildData/index.vue
#	src/views/data_admin/buildGraphy/graphyTabs.vue
#	src/views/data_admin/buildGraphy/index.vue
shaun-sheep 4 years ago
parent
commit
2e7600dc1b
100 changed files with 6010 additions and 3140 deletions
  1. 1 1
      .editorconfig
  2. 9 1
      README.md
  3. 0 1
      build/webpack.dev.conf.js
  4. 220 220
      config/index.js
  5. 9 5
      index.html
  6. 95 95
      package.json
  7. 40 0
      publish.js
  8. 7 1
      src/App.vue
  9. 36 17
      src/api/data_admin/buildTaskApi.js
  10. 193 142
      src/api/model/file.js
  11. 29 0
      src/api/model/report.js
  12. 177 0
      src/api/relation/api.js
  13. 21 21
      src/api/scan/fetch.js
  14. 42 42
      src/api/scan/httpUtil.js
  15. 1228 689
      src/api/scan/request.js
  16. 14 0
      src/api/topo/index.js
  17. 30 0
      src/api/uploader/index.js
  18. BIN
      src/assets/house.jpg
  19. BIN
      src/assets/image/floorBG.png
  20. BIN
      src/assets/image/model/arrowBlue.png
  21. BIN
      src/assets/image/model/arrowGray.png
  22. BIN
      src/assets/image/model/arrowGreen.png
  23. BIN
      src/assets/image/model/columnBlue.png
  24. BIN
      src/assets/image/model/columnGray.png
  25. BIN
      src/assets/image/model/columnGreen.png
  26. BIN
      src/assets/image/model/delModelBlue.png
  27. BIN
      src/assets/image/model/delModelGray.png
  28. BIN
      src/assets/image/model/downJsonBlue.png
  29. BIN
      src/assets/image/model/downJsonGray.png
  30. BIN
      src/assets/image/model/downJsonGreen.png
  31. BIN
      src/assets/image/model/downModelBlue.png
  32. BIN
      src/assets/image/model/downModelGray.png
  33. BIN
      src/assets/image/model/downModelGreen.png
  34. BIN
      src/assets/image/model/rightDownBlue.png
  35. BIN
      src/assets/image/model/rightDownGray.png
  36. BIN
      src/assets/image/model/rightDownGreen.png
  37. BIN
      src/assets/image/model/upJsonBlue.png
  38. BIN
      src/assets/image/model/upJsonGray.png
  39. BIN
      src/assets/image/model/upJsonGreen.png
  40. BIN
      src/assets/image/model/upModelBlue.png
  41. BIN
      src/assets/image/model/upModelGray.png
  42. BIN
      src/assets/image/model/upModelGreen.png
  43. BIN
      src/assets/image/model/waitingAnlBlue.png
  44. BIN
      src/assets/image/model/waitingAnlGray.png
  45. BIN
      src/assets/image/model/waitingAnlGreen.png
  46. BIN
      src/assets/image/model/waitingManageBlue.png
  47. BIN
      src/assets/image/model/waitingManageGray.png
  48. BIN
      src/assets/image/model/waitingManageGreen.png
  49. 1 1
      src/assets/scss/point/point_config/common.scss
  50. 1 1
      src/assets/scss/point/point_config/reset.scss
  51. 296 160
      src/assets/style/iconfont/iconfont.css
  52. BIN
      src/assets/style/iconfont/iconfont.eot
  53. 179 77
      src/assets/style/iconfont/iconfont.svg
  54. BIN
      src/assets/style/iconfont/iconfont.ttf
  55. BIN
      src/assets/style/iconfont/iconfont.woff
  56. 450 102
      src/components/business_space/business/handsontable.vue
  57. 1 1
      src/components/business_space/dialogs/addDialog/businessDialog.vue
  58. 3 6
      src/components/business_space/dialogs/detailsDialog.vue
  59. 49 37
      src/components/business_space/dialogs/list/filesDialog.vue
  60. 65 22
      src/components/business_space/dialogs/list/firm.vue
  61. 1 2
      src/components/business_space/dialogs/list/picDialog.vue
  62. 0 2
      src/components/business_space/dialogs/list/uploadImgDialog.vue
  63. 6 1
      src/components/business_space/lib/detailsDia.vue
  64. 206 162
      src/components/business_space/lib/uploadFiles.vue
  65. 117 87
      src/components/business_space/lib/uploadImgsName.vue
  66. 9 3
      src/components/business_space/newAddDialogs/addEquipDialog.vue
  67. 1 0
      src/components/business_space/newAddDialogs/addSystemDialog.vue
  68. 136 0
      src/components/business_space/newAddDialogs/roomInFloorDialog.vue
  69. 21 21
      src/components/business_space/newGraphy/canvasFun.vue
  70. 4 0
      src/components/business_space/newGraphy/createBSP.vue
  71. 748 201
      src/components/business_space/newGraphy/graphy.vue
  72. 19 17
      src/components/business_space/newGraphy/unRelateBSP.vue
  73. 28 20
      src/components/business_space/newTables/eqToSpaceTable.vue
  74. 22 12
      src/components/business_space/newTables/syInSpaceTable.vue
  75. 8 8
      src/components/business_space/table/equipTable.vue
  76. 1 0
      src/components/common/handsontable.vue
  77. 70 172
      src/components/config_point/dictionaryCascader.vue
  78. 4 0
      src/components/config_point/location_flag.vue
  79. 3 3
      src/components/config_point/step3_edit/auto_handle.vue
  80. 5 3
      src/components/config_point/step3_edit/enum_handle.vue
  81. 3 3
      src/components/config_point/step3_edit/formula_handle.vue
  82. 375 243
      src/components/config_point/step3_edit/index.vue
  83. 3 3
      src/components/config_point/step3_edit/no_handle.vue
  84. 2 0
      src/components/config_point/step3_edit/split_handle.vue
  85. 305 249
      src/components/config_point/step3_point/3_temps.vue
  86. 1 0
      src/components/config_point/step3_point/steps3_main.vue
  87. 79 23
      src/components/data_admin/buildTask/detail/assetsDetail.vue
  88. 233 134
      src/components/data_admin/buildTask/detail/deviceDetail.vue
  89. 3 3
      src/components/data_admin/buildTask/dialog/addTaskDialog.vue
  90. 73 35
      src/components/data_admin/buildTask/dialog/modelTaskDialog.vue
  91. 79 21
      src/components/data_admin/buildTask/draw/drawModel.vue
  92. 14 9
      src/components/data_admin/buildTask/table/assetsTable.vue
  93. 40 22
      src/components/data_admin/buildTask/table/deviceTable.vue
  94. 34 21
      src/components/data_admin/buildTask/table/modelTable.vue
  95. 3 1
      src/components/data_admin/buildTask/table/replaceTable.vue
  96. 3 1
      src/components/data_admin/buildTask/table/tearTable.vue
  97. 17 15
      src/components/data_admin/buildTask/taskStatistics.vue
  98. 137 0
      src/components/data_admin/zoneInput.vue
  99. 1 1
      src/components/dialogHanson/addDevice.vue
  100. 0 0
      src/components/dialogs/addDialog/businessDialog.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

+ 9 - 1
README.md

@@ -22,7 +22,7 @@ npm run build --report
 #### 目录结构
 
 ```
-│  .editorconfig                        # 格式化配置,修改缩进为4
+│  .editorconfig                        # 格式化配置,修改缩进为2
 │  index.html                           # 修改页面title
 │  package.json                         # 包
 │  README.md                            # 说明文档
@@ -145,3 +145,11 @@ export default {
 this.$store.dispatch('setBreadcrumb', [{ label: 'Demo' }, { label: 'Form'  ])
 this.$store.dispatch('setBreadcrumb', [{ label: 'Demo', path: '' }, { label: 'Form' , path: ''}])
 ```
+#### 上传管理器调用方法(上传较大文件时使用)
+
+```
+在组件中引入Bus中央时间总线
+    Bus.$emit('openUploader', query, file)    //添加文件到上传管理器中, query为参数, file为H5原生的文件对象
+    Bus.$on('fileAdded', () => {})            //文件选择后的回调
+    Bus.$on('fileSuccess', () => {})          //文件上传成功后的回调
+```

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

+ 220 - 220
config/index.js

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

+ 9 - 5
index.html

@@ -2,14 +2,18 @@
 <html>
 
 <head>
-    <meta charset="utf-8" />
-    <meta name="viewport" content="width=device-width,initial-scale=1.0" />
-    <link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_1318214_i7toym6dora.css">
-    <title>sagacloud-admin</title>
+  <meta charset="utf-8"/>
+  <meta name="viewport" content="width=device-width,initial-scale=1.0"/>
+  <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
+  <meta http-equiv="Cache" content="no-cache">
+  <meta http-equiv="Pragma" content="no-cache"/>
+  <meta http-equiv="Expires" content="0"/>
+  <link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_1318214_i7toym6dora.css">
+  <title>sagacloud-admin</title>
 </head>
 
 <body>
     <div id="app"></div>
 </body>
 
-</html>
+</html>

+ 95 - 95
package.json

@@ -1,97 +1,97 @@
 {
-    "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": {
-        "@saga-web/base": "2.1.9",
-        "@saga-web/cad-engine": "2.0.561",
-        "@saga-web/draw": "2.1.75",
-        "@saga-web/graphy": "2.1.47",
-        "@saga-web/topology": "1.0.83",
-        "axios": "^0.18.0",
-        "echarts": "^4.1.0",
-        "el-cascader-multi": "^1.1.8",
-        "element-ui": "^2.11.1",
-        "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"
-    },
-    "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"
-    ]
+  "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": {
+    "@saga-web/base": "2.1.9",
+    "@saga-web/cad-engine": "2.0.561",
+    "@saga-web/draw": "2.1.75",
+    "@saga-web/graphy": "2.1.47",
+    "@saga-web/topology": "1.0.83",
+    "axios": "^0.18.0",
+    "echarts": "^4.1.0",
+    "el-cascader-multi": "^1.1.8",
+    "element-ui": "^2.11.1",
+    "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"
+  },
+  "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"
+  ]
 }

+ 40 - 0
publish.js

@@ -0,0 +1,40 @@
+/*
+ * @Author: zhangyu
+ * @Date: 2019-12-18 16:18:30
+ * @Info: 自动化部署
+ * @LastEditTime : 2020-02-11 17:47:56
+ */
+
+const Client = require("node-ssh");
+const ssh = new Client(); 
+
+ssh.connect({
+  host: process.env.npm_package_remote_host,
+  port: "22",
+  // privateKey: `${process.env.HOME}\\.ssh\\id_rsa_2048`,
+  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();
+  });
+});

+ 7 - 1
src/App.vue

@@ -1,11 +1,17 @@
 <template>
     <div id='app'>
         <router-view/>
+        <global-uploader></global-uploader>
     </div>
 </template>
 
 <script>
+import globalUploader from '@/components/globaluploader'
+
 export default {
-    name: 'App'
+    name: 'App',
+    components: {
+        globalUploader
+    },
 }
 </script>

+ 36 - 17
src/api/data_admin/buildTaskApi.js

@@ -1,11 +1,12 @@
 import http from '../scan/httpUtil'
+
 const baseUrl = '/api';
 
 /**
  * info: 查询统计数量(查询总数量不传参数,查询已完成数量TaskState=0,查询未找到TaskState=-1,查询未验证TaskState=1)
  * @param {Filters:string} param 查询参数
  * @param {*} success  成功的回调函数
- * 
+ *
  */
 export function queryTaskCount(param, success) {
     let url = `${baseUrl}/datacenter/scan-task-base/count`;
@@ -38,53 +39,71 @@ export function updateModelTask(param, success) {
     let url = `${baseUrl}/datacenter/model-scan-task/update`;
     http.postJson(url, param, success)
 }
+
 //查询设备分类
 export function queryModelCategory(param, success) {
-    let url = `${baseUrl}/datacenter/model-scan-task/model-category-query`;
-    http.postJson(url, param, success)
+  let url = `${baseUrl}/datacenter/model-scan-task/model-category-query`;
+  http.postJson(url, param, success)
 }
+
 //查询模型文件夹和文件
 export function queryModelFile(param, success) {
-    let url = `${baseUrl}/datacenter/model-scan-task/model-file-query`;
-    http.postJson(url, param, success)
+  let url = `${baseUrl}/datacenter/model-scan-task/model-file-query`;
+  http.postJson(url, param, success)
+}
+
+//查询模型任务下的部件类型及数量
+export function modelCategoryCount(param, success) {
+  let url = `${baseUrl}/datacenter/model-scan-task/category-count`;
+  http.postJson(url, param, success)
 }
 
 /*************************设备台账任务接口****************************/
 //创建设备台账任务
 export function createDeviceTask(param, success) {
-    let url = `${baseUrl}/datacenter/equip-scan-task/create`;
-    http.postJson(url, param, success)
+  let url = `${baseUrl}/datacenter/equip-scan-task/create`;
+  http.postJson(url, param, success)
 }
+
 //根据id删除设备台账任务
 export function deleteDeviceTask(param, success) {
-    let url = `${baseUrl}/datacenter/equip-scan-task/delete`;
-    http.postJson(url, param, success)
+  let url = `${baseUrl}/datacenter/equip-scan-task/delete`;
+  http.postJson(url, param, success)
 }
 //查询设备台账任务
 export function queryDeviceTask(param, success) {
     let url = `${baseUrl}/datacenter/equip-scan-task/page-query`;
     http.postJson(url, param, success)
 }
+
 //更新设备台账任务
 export function updateDeviceTask(param, success) {
-    let url = `${baseUrl}/datacenter/equip-scan-task/update`;
-    http.postJson(url, param, success)
+  let url = `${baseUrl}/datacenter/equip-scan-task/update`;
+  http.postJson(url, param, success)
 }
+
 //查询设备分类
 export function queryDeviceCategory(param, success) {
-    let url = `${baseUrl}/datacenter/equip-scan-task/equip-category-query`;
-    http.postJson(url, param, success)
+  let url = `${baseUrl}/datacenter/equip-scan-task/equip-category-query`;
+  http.postJson(url, param, success)
+}
+
+//查询设备任务下的部件类型及数量
+export function categoryCount(param, success) {
+  let url = `${baseUrl}/datacenter/equip-scan-task/category-count`
+  http.postJson(url, param, success)
 }
 
 /*************************资产台账任务接口****************************/
 //统计数量
 export function countAssetsTask(param, success) {
-    let url = `${baseUrl}/datacenter/property-scan-task/count`;
-    http.postJson(url, param, success)
+  let url = `${baseUrl}/datacenter/property-scan-task/count`;
+  http.postJson(url, param, success)
 }
+
 //创建设备台账任务
 export function createAssetsTask(param, success) {
-    let url = `${baseUrl}/datacenter/property-scan-task/create`;
+  let url = `${baseUrl}/datacenter/property-scan-task/create`;
     http.postJson(url, param, success)
 }
 //根据id删除设备台账任务
@@ -106,4 +125,4 @@ export function updateAssetsTask(param, success) {
 export function queryAssetsFamily(param, success) {
     let url = `${baseUrl}/datacenter/property-scan-task/property-category-query`;
     http.postJson(url, param, success)
-}
+}

+ 193 - 142
src/api/model/file.js

@@ -2,6 +2,7 @@ import httputils from '@/api/scan/httpUtil'
 import { Message } from 'element-ui';
 import axios from 'axios'
 const baseUrl = '/modelapi';
+const revitUrl = '/schedulerapi';
 
 let api = {
     // 新建模型文件夹
@@ -61,11 +62,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)
     },
@@ -102,87 +106,87 @@ let api = {
         return httputils.postJson(`${baseUrl}/model-floor/query`, params, success)
     },
     // 创建楼层
-    createFloor(params) {
-        // 判断该楼层是否存在
+    // createFloor(params) {
+    //     // 判断该楼层是否存在
 
-        let data = {
-            Content: [{
-                FolderId: params.FolderId,
-                FloorName: params.FloorName,
-                ProjectId: params.ProjectId,      //项目id
-            }]
-        };
-        return new Promise((resolve, preject) => {
-            this.queryFloorItem(params, (res) => {
-                if (res.Total == 0) {
-                    // 创建楼层
-                    httputils.postJson(`${baseUrl}/model-floor/create`, data, (res) => {
-                        let modelFile = {
-                            Content: [{
-                                // ProjectId: params.ProjectId,      //项目id
-                                FloorModelId: res.EntityList[0].Id, //模型所属楼层(FloorModel外键)
-                                ModelName: params.Form.file.name,        //模型文件名
-                                UserName: params.userName,
-                                UserId: params.userId,
-                                Note: params.Form.desc
-                                // ReplaceReason: 0
-                            }]
-                        }
-                        //创建模型文件
-                        this.createModelFile(modelFile, (createModelRes) => {
-                            // 与此楼文件进行绑定
-                            let upDateModelData = {
-                                Content: [{
-                                    Id: res.EntityList[0].Id, //id
-                                    CurrentModelId: createModelRes.EntityList[0].Id //该楼层当前的模型id
-                                }]
-                            }
-                            this.updateFloorName(upDateModelData, (upDateModelSucess) => {
-                                if (upDateModelSucess.Result == "success") {
-                                    resolve({
-                                        Result: 'success',
-                                        FloorModelId: res.EntityList[0].Id,   //楼层模型文件
-                                        CurrentModelId: createModelRes.EntityList[0].Id //模型文件id
-                                    })
-                                }
-                            })
-                        })
-                    })
-                } else {
-                    let modelFile = {
-                        Content: [{
-                            // ProjectId: params.ProjectId,      //项目id
-                            FloorModelId: res.Content[0].Id, //模型所属楼层(FloorModel外键)
-                            ModelName: params.Form.file.name,        //模型文件名
-                            UserName: params.userName,
-                            UserId: params.userId,
-                            Note: params.Form.desc
-                            // ReplaceReason: 0
-                        }]
-                    }
-                    //创建模型文件
-                    this.createModelFile(modelFile, (createModelRes) => {
-                        // 与此楼文件进行绑定
-                        let upDateModelData = {
-                            Content: [{
-                                Id: res.Content[0].Id, //id
-                                CurrentModelId: createModelRes.EntityList[0].Id //该楼层当前的模型id
-                            }]
-                        }
-                        this.updateFloorName(upDateModelData, (upDateModelSucess) => {
-                            if (upDateModelSucess.Result == "success") {
-                                resolve({
-                                    Result: 'success',
-                                    FloorModelId: res.Content[0].Id,   //楼层模型文件
-                                    CurrentModelId: createModelRes.EntityList[0].Id //模型文件id
-                                })
-                            }
-                        })
-                    })
-                }
-            })
-        })
-    },
+    //     let data = {
+    //         Content: [{
+    //             FolderId: params.FolderId,
+    //             FloorName: params.FloorName,
+    //             ProjectId: params.ProjectId,      //项目id
+    //         }]
+    //     };
+    //     return new Promise((resolve, preject) => {
+    //         this.queryFloorItem(params, (res) => {
+    //             if (res.Total == 0) {
+    //                 // 创建楼层
+    //                 httputils.postJson(`${baseUrl}/model-floor/create`, data, (res) => {
+    //                     let modelFile = {
+    //                         Content: [{
+    //                             // ProjectId: params.ProjectId,      //项目id
+    //                             FloorModelId: res.EntityList[0].Id, //模型所属楼层(FloorModel外键)
+    //                             ModelName: params.Form.file.name,        //模型文件名
+    //                             UserName: params.userName,
+    //                             UserId: params.userId,
+    //                             Note: params.Form.desc
+    //                             // ReplaceReason: 0
+    //                         }]
+    //                     }
+    //                     //创建模型文件
+    //                     this.createModelFile(modelFile, (createModelRes) => {
+    //                         // 与此楼文件进行绑定
+    //                         let upDateModelData = {
+    //                             Content: [{
+    //                                 Id: res.EntityList[0].Id, //id
+    //                                 CurrentModelId: createModelRes.EntityList[0].Id //该楼层当前的模型id
+    //                             }]
+    //                         }
+    //                         this.updateFloorName(upDateModelData, (upDateModelSucess) => {
+    //                             if (upDateModelSucess.Result == "success") {
+    //                                 resolve({
+    //                                     Result: 'success',
+    //                                     FloorModelId: res.EntityList[0].Id,   //楼层模型文件
+    //                                     CurrentModelId: createModelRes.EntityList[0].Id //模型文件id
+    //                                 })
+    //                             }
+    //                         })
+    //                     })
+    //                 })
+    //             } else {
+    //                 let modelFile = {
+    //                     Content: [{
+    //                         // ProjectId: params.ProjectId,      //项目id
+    //                         FloorModelId: res.Content[0].Id, //模型所属楼层(FloorModel外键)
+    //                         ModelName: params.Form.file.name,        //模型文件名
+    //                         UserName: params.userName,
+    //                         UserId: params.userId,
+    //                         Note: params.Form.desc
+    //                         // ReplaceReason: 0
+    //                     }]
+    //                 }
+    //                 //创建模型文件
+    //                 this.createModelFile(modelFile, (createModelRes) => {
+    //                     // 与此楼文件进行绑定
+    //                     let upDateModelData = {
+    //                         Content: [{
+    //                             Id: res.Content[0].Id, //id
+    //                             CurrentModelId: createModelRes.EntityList[0].Id //该楼层当前的模型id
+    //                         }]
+    //                     }
+    //                     this.updateFloorName(upDateModelData, (upDateModelSucess) => {
+    //                         if (upDateModelSucess.Result == "success") {
+    //                             resolve({
+    //                                 Result: 'success',
+    //                                 FloorModelId: res.Content[0].Id,   //楼层模型文件
+    //                                 CurrentModelId: createModelRes.EntityList[0].Id //模型文件id
+    //                             })
+    //                         }
+    //                     })
+    //                 })
+    //             }
+    //         })
+    //     })
+    // },
     // 删除楼层文件
     deleteFloor(data) {
         return httputils.postJson(`${baseUrl}/model-floor/delete`, data)
@@ -210,7 +214,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,72 +223,82 @@ 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)
     },
     // 上传模型文件
-    uploadModelFile(payload, ProjectId,callback1, callback2) {
-        axios({
-            url: baseUrl + '/model-file/upload',
-            method: 'post',
-            headers: {
-                ProjectId: ProjectId
-            },
-            onUploadProgress: function (progressEvent) { //原生获取上传进度的事件
-                if (progressEvent.lengthComputable) {
-                    //属性lengthComputable主要表明总共需要完成的工作量和已经完成的工作是否可以被测量
-                    //如果lengthComputable为false,就获取不到progressEvent.total和progressEvent.loaded
-                    callback1(progressEvent);
-                }
-            },
-            data: payload
-        }).then(res => {
-            callback2(res);
-        }).catch(error => {
-            console.log('this is a catch')
-            console.log(error)
-        })
+    // uploadModelFile(payload, ProjectId,callback1, callback2) {
+    //     axios({
+    //         url: baseUrl + '/model-file/upload',
+    //         method: 'post',
+    //         headers: {
+    //             ProjectId: ProjectId
+    //         },
+    //         onUploadProgress: function (progressEvent) { //原生获取上传进度的事件
+    //             if (progressEvent.lengthComputable) {
+    //                 //属性lengthComputable主要表明总共需要完成的工作量和已经完成的工作是否可以被测量
+    //                 //如果lengthComputable为false,就获取不到progressEvent.total和progressEvent.loaded
+    //                 callback1(progressEvent);
+    //             }
+    //         },
+    //         data: payload
+    //     }).then(res => {
+    //         callback2(res);
+    //     }).catch(error => {
+    //         console.log('this is a catch')
+    //         console.log(error)
+    //     })
+    // },
+
+    //准备分片上传模型文件接口
+    modelFileUpload(data, success) {
+        return httputils.postJson(`${baseUrl}/model-file/upload`, data, success)
     },
-    // 更新模型文件
-    upDateModelFile(data, ProjectId, UserName, UserId, callback1, callback2) {
-        let modelFile = {
-            Content: [{
-                FloorModelId:data.replaceModelItem.Id, //模型id
-                ModelName: data.Form.file.name,        //模型名字
-                UserName: UserName,
-                UserId: UserId,
-                Note: data.replaceModelItem.Note,
-                ReplaceReason: data.Form.ReplaceReason
-            }]
-        }
-        // //创建模型文件
-        this.createModelFile(modelFile, (createModelRes) => {
-            // 与此楼文件进行绑定
-            let upDateModelData = {
-                Content: [{
-                    Id:data.replaceModelItem.Id, //楼层
-                    CurrentModelId: createModelRes.EntityList[0].Id
-                }]
-            }
-            this.updateFloorName(upDateModelData, (upDateModelSucess) => {
-                if (upDateModelSucess.Result == "success") {
-                    // 处理数据
-                    let formData = new FormData();
-                    formData.append(
-                      "model",
-                      JSON.stringify({
-                        FloorModelId: data.replaceModelItem.Id,
-                        Id:createModelRes.EntityList[0].Id
-                      })
-                    );
-                    formData.append("file", data.Form.file.raw);
-                    this.uploadModelFile(formData,ProjectId,callback1,callback2)
-                }
-            })
-        })
+
+    mergeModelFile(data, success) {
+        return httputils.postJson(`${baseUrl}/model-file/merge`, data, success)
     }
 
+    // 更新模型文件
+    // upDateModelFile(data, ProjectId, UserName, UserId, callback1, callback2) {
+    //     let modelFile = {
+    //         Content: [{
+    //             FloorModelId:data.replaceModelItem.Id, //模型id
+    //             ModelName: data.Form.file.name,        //模型名字
+    //             UserName: UserName,
+    //             UserId: UserId,
+    //             Note: data.replaceModelItem.Note,
+    //             ReplaceReason: data.Form.ReplaceReason
+    //         }]
+    //     }
+    //     // //创建模型文件
+    //     this.createModelFile(modelFile, (createModelRes) => {
+    //         // 与此楼文件进行绑定
+    //         let upDateModelData = {
+    //             Content: [{
+    //                 Id:data.replaceModelItem.Id, //楼层
+    //                 CurrentModelId: createModelRes.EntityList[0].Id
+    //             }]
+    //         }
+    //         this.updateFloorName(upDateModelData, (upDateModelSucess) => {
+    //             if (upDateModelSucess.Result == "success") {
+    //                 // 处理数据
+    //                 let formData = new FormData();
+    //                 formData.append(
+    //                   "model",
+    //                   JSON.stringify({
+    //                     FloorModelId: data.replaceModelItem.Id,
+    //                     Id:createModelRes.EntityList[0].Id
+    //                   })
+    //                 );
+    //                 formData.append("file", data.Form.file.raw);
+    //                 this.uploadModelFile(formData,ProjectId,callback1,callback2)
+    //             }
+    //         })
+    //     })
+    // }
+
 }
 export default api
 
@@ -291,4 +306,40 @@ export default api
 export function bindFloorModel(param, success) {
     let url = `${baseUrl}/model-floor/bind`;
     httputils.postJson(url, param, success)
+}
+
+//根据模型id 获取模型文件夹及文件名
+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)
+}
+
+// 查询模型文件
+export function queryFileByModelId(param, success) {
+    let url = `${baseUrl}/model-file/query`;
+    httputils.postJson(url, param, success)
+}
+
+// 模型流程监控
+export function modelPathControl(param, success) {
+    let url = `${baseUrl}/model-monitor/query`;
+    httputils.postJson(url, param, success)
+}
+
+// 模型流程监控-获取待分配模型数量
+export function unassignQuery(param, success) {
+    let url = `${revitUrl}/task/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)
+}

+ 177 - 0
src/api/relation/api.js

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

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

@@ -1,54 +1,54 @@
-import { Message } from 'element-ui';
+import {Message} from 'element-ui';
 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 = storage.get("global_project_selected")
-        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 = storage.get("global_project_selected")
-        let userName = storage.get("user_name")
-        let vm = this;
-        fetch({ url: url, method: 'post', data: data, headers: {'ProjectId': ProjectId, 'Comming': 'adm' ,'Account': userName} }).then((response) => {
-            successResponse(vm, response, success, failed)
-        }).catch(error => {
-            errorResponse(vm, error, err);
-        });
-    }
-}
+  getJson: function(url, data, success, failed, err) {
+    let ProjectId = localStorage.getItem("projectId")
+    let userName = storage.get("user_name")
+    let vm = this;
+    fetch({ url: url, method: 'get', params: data, headers: {'ProjectId': ProjectId, 'Comming': 'adm' ,'Account': userName}}).then((response) => {
+      successResponse(vm, response, success, failed)
+    }).catch(error => {
+      errorResponse(vm, error, err);
+    });
+  },
+  postJson: function(url, data, success, failed, err) {
+    let ProjectId = localStorage.getItem("projectId")
+    let userName = storage.get("user_name")
+    let vm = this;
+    fetch({ url: url, method: 'post', data: data, headers: {'ProjectId': ProjectId, 'Comming': 'adm' ,'Account': userName} }).then((response) => {
+      successResponse(vm, response, success, failed)
+    }).catch(error => {
+      errorResponse(vm, error, err);
+    });
+  }
+}

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


+ 14 - 0
src/api/topo/index.js

@@ -0,0 +1,14 @@
+import httputils from '@/api/scan/httpUtil'
+const baseUrl = '/api';
+
+// 创建拓扑图
+export function topoCreate(param, success) {
+  let url = `${baseUrl}/datacenter/topo/create`;
+  httputils.postJson(url, param, success)
+}
+
+// 查询拓扑图
+export function topoQuery(param, success) {
+  let url = `${baseUrl}/datacenter/topo/query?type=${param.type}`;
+  httputils.postJson(url, param.data||{}, success)
+}

+ 30 - 0
src/api/uploader/index.js

@@ -0,0 +1,30 @@
+import http from '../scan/httpUtil'
+
+const baseUrl = '/image-service'
+
+//分片上传文件接口
+
+/**
+ * info: 申请分片上传接口(获取上传UploadId)
+ * @param {systemId:string} param 系统的名称
+ * @param {secret:string} param 系统的密码
+ * @param {key:string} param  成功的回上传的文件名(可以包含文件路径)
+ * @param {overwrite:boolean} param 表示是否覆盖已有的文件(如果存在) 注:overwrite有一定风险, 只在注册分片时校验, 合并时候如果key被占用, 会覆盖掉之前文件
+ * 
+ */
+export function getUploadId(param, success) {
+  let url = ` ${baseUrl}/common/register_multipart_upload?systemId=${param.systemId}&secret=${param.secret}&key=${param.key}&overwrite=${param.overwrite}`
+  http.postJson(url, {}, success)
+}
+
+/**
+ * info: 合并分片的接口
+ * @param {systemId:string} param 系统的名称
+ * @param {secret:string} param 系统的密码
+ * @param {uploadId:string} param  需要合并的上传文件的uploadId
+ * 
+ */
+export function mergeMultipart(param, success) {
+  let url = ` ${baseUrl}/common/merge_multipart?systemId=${param.systemId}&secret=${param.secret}&uploadId=${param.uploadId}`
+  http.postJson(url, {}, success)
+}

BIN
src/assets/house.jpg


BIN
src/assets/image/floorBG.png


BIN
src/assets/image/model/arrowBlue.png


BIN
src/assets/image/model/arrowGray.png


BIN
src/assets/image/model/arrowGreen.png


BIN
src/assets/image/model/columnBlue.png


BIN
src/assets/image/model/columnGray.png


BIN
src/assets/image/model/columnGreen.png


BIN
src/assets/image/model/delModelBlue.png


BIN
src/assets/image/model/delModelGray.png


BIN
src/assets/image/model/downJsonBlue.png


BIN
src/assets/image/model/downJsonGray.png


BIN
src/assets/image/model/downJsonGreen.png


BIN
src/assets/image/model/downModelBlue.png


BIN
src/assets/image/model/downModelGray.png


BIN
src/assets/image/model/downModelGreen.png


BIN
src/assets/image/model/rightDownBlue.png


BIN
src/assets/image/model/rightDownGray.png


BIN
src/assets/image/model/rightDownGreen.png


BIN
src/assets/image/model/upJsonBlue.png


BIN
src/assets/image/model/upJsonGray.png


BIN
src/assets/image/model/upJsonGreen.png


BIN
src/assets/image/model/upModelBlue.png


BIN
src/assets/image/model/upModelGray.png


BIN
src/assets/image/model/upModelGreen.png


BIN
src/assets/image/model/waitingAnlBlue.png


BIN
src/assets/image/model/waitingAnlGray.png


BIN
src/assets/image/model/waitingAnlGreen.png


BIN
src/assets/image/model/waitingManageBlue.png


BIN
src/assets/image/model/waitingManageGray.png


BIN
src/assets/image/model/waitingManageGreen.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 suppressed because it is too large
+ 296 - 160
src/assets/style/iconfont/iconfont.css


BIN
src/assets/style/iconfont/iconfont.eot


File diff suppressed because it is too large
+ 179 - 77
src/assets/style/iconfont/iconfont.svg


BIN
src/assets/style/iconfont/iconfont.ttf


BIN
src/assets/style/iconfont/iconfont.woff


+ 450 - 102
src/components/business_space/business/handsontable.vue

@@ -1,6 +1,15 @@
 <template>
   <div id="handsontable" v-loading="isLoading">
     <el-row class="left">
+      <div style="display: inline-block" v-show="zoneCode === 'OtherZone'">
+        <!--              <div style="display: inline-block" v-show="!onlyRead && zoneCode === 'OtherZone'">-->
+        <el-button @click="addZoneBtn" type="primary">添加分区</el-button>
+        <el-select v-model="OtherValue" placeholder="请选择分区类型" @change="changeOtherZone">
+          <el-option v-for="item in OtherList" :key="item.value" :label="item.label" :value="item.value">
+          </el-option>
+        </el-select>
+        &nbsp;&nbsp; | &nbsp;&nbsp;
+      </div>
       <el-select v-model="onlyRead" @change="getData(false)" style="width:100px;margin-right:20px;vertical-align:bottom;">
         <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
       </el-select>
@@ -10,6 +19,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,40 +38,84 @@
     </div> -->
     <!-- 二维码弹窗 -->
     <qrcode :dialog="dialog" :qrcodeUrl="qrcodeUrl" :addBody="true" ref="qrcode"></qrcode>
+    <!--      上传图片-->
+    <upload-img-dialog :read="onlyRead" @changeFile="imgChange" :keysArr="imgsArr" :dialog="myDialog" />
+    <dialogZone ref="zone" @createSuccess="getOtherType" />
+    <!-- 不支持的输入方式 -->
+    <el-dialog title="临时维护信息点" :visible.sync="myDialog.update" @close="handleCloseUpdate" width="670px">
+      <el-row>
+        该信息点未定义对应组件,现在维护数据不确定后续是否可用。如确实需要维护,请点击
+        <el-link @click="updateInputShow = true" type="primary" :underline="false">继续维护</el-link>
+        。
+      </el-row>
+      <el-row style="margin-top:20px;" v-show="updateInputShow">
+        <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 8}" placeholder="请输入内容"
+                  v-model="updateInput"></el-input>
+      </el-row>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="myDialog.update = false">取 消</el-button>
+        <el-button type="primary" @click="handleClickUpdate">确 认</el-button>
+      </span>
+    </el-dialog>
+    <!-- 新增业务空间 -->
+    <el-dialog title="确定新增业务空间的分区类型" :visible.sync="myDialog.addSpace" width="670px">
+      <el-row>
+        <space-cascader ref="cascader" @change="changeAddType"></space-cascader>
+      </el-row>
+      <span slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="toAddSpace">下 一 步</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 <script>
-// 引用handsontable插件
-import "@/assets/js/chosen.jquery.min";
-import tools from "@/utils/scan/tools";
-import "@/assets/js/handsontable-chosen-editor";
-import myPagination from "@/components/common/myPagination";
-import addBusiness from "@/components/business_space/dialogs/addDialog/businessDialog"
-import showTools from "@/utils/handsontable/notShow"
-import handsonUtils from "@/utils/hasontableUtils"
-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 qrcode from "@/components/ledger/lib/qrcode";
-import { queryZone, updateZone, deleteZone, createZone, BeatchQueryParam, updateRelateInSpAndBuild } from "@/api/scan/request";
-import { mapGetters, mapActions } from "vuex";
-export default {
-  props: {
-    id: {},
-    zoneCode: {}
-  },
-  components: {
-    qrcode, //二维码页面
-    myPagination,
-    addBusiness
+  // 引用handsontable插件
+  import "@/assets/js/chosen.jquery.min";
+  import tools from "@/utils/scan/tools";
+  import "@/assets/js/handsontable-chosen-editor";
+  import lStorage from '@/utils/localStorage'
+  import myPagination from "@/components/common/myPagination";
+  import addBusiness from "@/components/business_space/dialogs/addDialog/businessDialog"
+  import showTools from "@/utils/handsontable/notShow"
+  import handsonUtils from "@/utils/hasontableUtils"
+  import Handsontable from "handsontable-pro"
+  import buildFloor from '@/utils/handsontable/buildFloorData'
+  import spaceCascader from '@/components/ledger/lib/spaceSelect'
+  import 'handsontable-pro/dist/handsontable.full.css'
+  import uploadImgDialog from "@/components/business_space/dialogs/list/uploadImgDialog"
+  import qrcode from "@/components/ledger/lib/qrcode";
+  import {
+    BeatchQueryParam,
+    handleZoneUpdateBd,
+    queryAllZoneType,
+    zoneCreate,
+    zoneDelete,
+    zoneQuery,
+    zoneUpdate
+  } from "@/api/scan/request";
+  import {mapGetters} from "vuex";
+  import dialogZone from "../../ledger/addDialog/dialogZone";
+
+  export default {
+    props: {
+      id: {},
+      zoneCode: {},
+      otherType: String
+    },
+    components: {
+      qrcode, //二维码页面
+      myPagination,
+      addBusiness,
+      uploadImgDialog,
+    dialogZone,
+    spaceCascader,
   },
   computed: {
     ...mapGetters("layout", ["projectId", "secret", "userId"]),
     showTypes() {
       return this.onlyRead ?
         [{ value: "Visible", label: '只看采集信息' }, { value: "all", label: '全部' }] :
-        [{ value: "partInfo", label: '隐藏信息点' }, { value: "all", label: '全部' }]
+        [{ value: "Visible", label: '只看采集信息' }, { value: "all", label: '全部' }]
     }
   },
   data() {
@@ -97,13 +153,36 @@ export default {
       filtersArr: [], //表格数据被过滤后的下标
       copyMain: [], //深拷贝数组
       buildFloorData: [], //楼层数据
+      zoneItemID: '',
+      inputMap: {
+        flowBuild: {
+          InputMode: 'D1',
+          Editable:true,
+          InfoPointCode:"flowBuild",
+          InfoPointName:"建筑楼层",
+          Path:"flowBuild"
+        }
+      }, //信息点和输入方式映射表
+      updateInputShow: false, //是否显示临时维护输入框
+      updateInfoPoint: '',//临时维护信息点
+      updateInput: '', //临时维护信息点值
+      myDialog: {
+        uploadImgs: false, //上传图片弹窗
+        update: false,//临时维护信息点
+        addSpace: false, //批量添加业务空间
+      },
+      imgsArr: [], //空间图片
+      OtherList: [],//其他分区筛选框
+      OtherValue: '',
+      addData: {},
     };
   },
   created() {
     this.setData()
     buildFloor.getData(this.buildFloorData)
   },
-  mounted() { },
+  mounted() {
+  },
   methods: {
     setData() {
       this.param.ProjId = this.projectId
@@ -113,63 +192,162 @@ export default {
     //获取表格数据
     getHeader(headers, buildFloorSelectd) {
       this.headers = headers
+      this.headers.forEach(item => {
+        if (item.Path) {
+          this.inputMap[item.Path] = item
+        }
+      })
       this.buildFloorSelectd = buildFloorSelectd
+      this.page.pageNumber = 1
       this.getData()
     },
+
     getData() {
-      this.isLoading = true
-      let params = {
-        zone: this.zoneCode,
-        data: {
-          Filters: ``,
-          Orders: "createTime desc, RoomID asc",
-          PageNumber: this.page.pageNumber,
-          PageSize: this.page.pageSize
+      this.zoneParam = {
+        ZoneType: this.zoneCode,
+        PageNumber: this.page.pageNumber,
+        PageSize: this.page.pageSize,
+        Orders: "createTime desc, RoomLocalName desc, RoomLocalID desc, RoomID asc"
+      }
+      if (this.buildFloorSelectd.length === 1) {
+        switch (this.buildFloorSelectd[0]) {
+          case 'noKnow':
+            this.zoneParam.BuildingId = 'isnull';
+            break;
+          case 'all':
+            // params.BuildingId = '';
+            break
+        }
+      } else if (this.buildFloorSelectd.length === 2) {
+        switch (this.buildFloorSelectd[1]) {
+          case 'noKnow':
+            this.zoneParam.BuildingId = this.buildFloorSelectd[0];
+            this.zoneParam.FloorId = 'isnull';
+            break;
+          case 'all':
+            this.zoneParam.BuildingId = this.buildFloorSelectd[0];
+            // params.FloorId = '';
+            break;
+          default:
+            this.zoneParam.BuildingId = this.buildFloorSelectd[0];
+            this.zoneParam.FloorId = this.buildFloorSelectd[1]
+
         }
       }
-      if (this.buildFloorSelectd[0] == "noKnow") {
-        params.data.Filters += `buildingId isNull`
-      } else if (this.buildFloorSelectd[0] && this.buildFloorSelectd[0] != "all") {
-        params.data.Filters += `buildingId='${this.buildFloorSelectd[0]}'`
+      if (this.zoneItemID) {
+        this.zoneParam.Filters = `RoomID="${this.zoneItemID}"`
       }
-      if (this.buildFloorSelectd.length > 1) {
-        if (this.buildFloorSelectd[1] == "noKnow") {
-          params.data.Filters += `;floorId isNull`
-        } else if (this.buildFloorSelectd[1] && this.buildFloorSelectd[1] != "all") {
-          params.data.Filters += `;floorId='${this.buildFloorSelectd[1]}'`
+      if (this.zoneCode != 'OtherZone') {
+        this.isLoading = true
+        this.getZoneMessage(this.zoneParam)
+      } else {
+        // 其他分区类型查询表数据接口
+        // if (localStorage.getItem('otherZone')) {
+        //   // this.OtherValue = (localStorage.getItem('otherZone'))
+        //   localStorage.removeItem('otherZone')
+        // }
+        if (this.OtherValue) {
+          this.zoneParam.ZoneType = this.OtherValue;
+          this.getZoneMessage(this.zoneParam)
+        } else {
+          this.main = []
         }
+        this.isLoading = false
+        this.getOtherType();
       }
-      if (!params.data.Filters) {
-        delete params.data.Filters
-      }
-      // if (this.buildFloorSelectd.length && this.buildFloorSelectd[0] && this.buildFloorSelectd[1]) {
-      //   params.data.Filters = `BuildingId='${this.buildFloorSelectd[0]}';FloorId='${this.buildFloorSelectd[1]}'`
-      // }
-      // else if (buildFloorSelectd.length && buildFloorSelectd[0] && !buildFloorSelectd[1]) {
-      //   params.data.Filters = `BuildingId='${buildFloorSelectd[0]}'`
-      // } else {
-      //   params.data.Filters = `BuildingId='';FloorId=''`
-      // }
-      queryZone(params, res => {
-        this.page.total = res.Total
+    },
+    //查询空间信息
+    getZoneMessage(param) {
+      let params = param
+      params.Orders = "createTime desc, RoomID asc, RoomLocalName desc, RoomLocalID desc"
+      zoneQuery(params, res => {
+        this.page.total = res.Total;
         this.main = res.Content.map((item) => {
           if (item.hasOwnProperty("BuildingId") && item.hasOwnProperty("FloorId")) {
             item.flowBuild = item.BuildingId + "-" + item.FloorId
           } else if (item.hasOwnProperty("BuildingId") && !item.hasOwnProperty("FloorId")) {
             item.flowBuild = item.BuildingId
           }
+          if (item.Outline) {
+            item.Outline = JSON.stringify(item.Outline)
+          }
           return item
         });
+
         if (this.main && this.main.length && this.main[0].RoomID) {
           this.copyMain = tools.deepCopy(this.main);
           if (this.onlyRead) {
             this.getBatch(this.main)
           }
         }
-        this.isLoading = false
+        this.isLoading = false;
         this.getMain()
       })
     },
+    // getData() {
+    //   if (this.zoneCode != 'OtherZone') {
+    //     this.isLoading = true
+    //     let params = {
+    //       zone: this.zoneCode,
+    //       data: {
+    //         Filters: ``,
+    //         Orders: "createTime desc, RoomID asc",
+    //         PageNumber: this.page.pageNumber,
+    //         PageSize: this.page.pageSize
+    //       }
+    //     }
+    //     if (this.buildFloorSelectd[0] == "noKnow") {
+    //       params.data.Filters += `buildingId isNull`
+    //     } else if (this.buildFloorSelectd[0] && this.buildFloorSelectd[0] != "all") {
+    //       params.data.Filters += `buildingId='${this.buildFloorSelectd[0]}'`
+    //     }
+    //     if (this.buildFloorSelectd.length > 1) {
+    //       if (this.buildFloorSelectd[1] == "noKnow") {
+    //         params.data.Filters += `;floorId isNull`
+    //       } else if (this.buildFloorSelectd[1] && this.buildFloorSelectd[1] != "all") {
+    //         params.data.Filters += `;floorId='${this.buildFloorSelectd[1]}'`
+    //       }
+    //     }
+    //     if (this.zoneItemID) {
+    //       params.data.Filters += `;RoomID='${this.zoneItemID}'`
+    //     }
+    //     if (!params.data.Filters) {
+    //       delete params.data.Filters
+    //     }
+    //     // if (this.buildFloorSelectd.length && this.buildFloorSelectd[0] && this.buildFloorSelectd[1]) {
+    //     //   params.data.Filters = `BuildingId='${this.buildFloorSelectd[0]}';FloorId='${this.buildFloorSelectd[1]}'`
+    //     // }
+    //     // else if (buildFloorSelectd.length && buildFloorSelectd[0] && !buildFloorSelectd[1]) {
+    //     //   params.data.Filters = `BuildingId='${buildFloorSelectd[0]}'`
+    //     // } else {
+    //     //   params.data.Filters = `BuildingId='';FloorId=''`
+    //     // }
+    //
+    //     queryZone(params, res => {
+    //       this.page.total = res.Total
+    //       this.main = res.Content.map((item) => {
+    //         if (item.hasOwnProperty("BuildingId") && item.hasOwnProperty("FloorId")) {
+    //           item.flowBuild = item.BuildingId + "-" + item.FloorId
+    //         } else if (item.hasOwnProperty("BuildingId") && !item.hasOwnProperty("FloorId")) {
+    //           item.flowBuild = item.BuildingId
+    //         }
+    //         return item
+    //       });
+    //       if (this.main && this.main.length && this.main[0].RoomID) {
+    //         this.copyMain = tools.deepCopy(this.main);
+    //         if (this.onlyRead) {
+    //           this.getBatch(this.main)
+    //         }
+    //       }
+    //       this.isLoading = false
+    //       this.getMain()
+    //     })
+    //   } else {
+    //     // 其他分区类型查询表数据接口
+    //     this.isLoading = false
+    //     this.getOtherType();
+    //   }
+    // },
     //获取表格主体内容
     getMain() {
       if (!!this.hot) {
@@ -190,7 +368,7 @@ export default {
         columns: this.getType(this.headers), //数据显示格式
         filters: true,
         fixedColumnsLeft: 4,
-        maxRows: this.main.length,
+        maxRows: this.main ? this.main.length : '',
         height: winHeight - 100 - 50 - 176,
         columnSorting: true, //添加排序
         sortIndicator: true, //添加排序
@@ -205,7 +383,7 @@ export default {
           "filter_by_value",
           "filter_action_bar"
         ],
-        contextMenu: {
+        contextMenu: this.onlyRead ? false : {
           items: {
             remove_row: {
               name: "删除该业务空间"
@@ -230,7 +408,7 @@ export default {
       let trimmedArr = this.trimmedRows();
       //是否启用了排序
       let isSort = this.hot.getPlugin("columnSorting").isSorted();
-      // debugger
+      //
       if (trimmedArr.length && isSort) {
         let sortArr = this.myHotArr.getPlugin("columnSorting").rowsMapper
           .__arrayMap;
@@ -251,22 +429,60 @@ export default {
     },
     getInfors(infos, row) {
       let val = this.hot.colToProp(row.col);
+      this.row = row.row;
+      let inputData = this.inputMap[val];
+      lStorage.set('screen_data', {path: this.$route.path, data: {RoomID: infos.RoomID, zone: this.zoneCode}})
       if (val == "point") {
+        let query = {
+          RoomID: infos.RoomID,
+          zone: this.zoneCode,
+          isMyTab: 2,
+          buildFloorSelectd: this.buildFloorSelectd
+        }
         this.$router.push({
           path: "/ledger/spaceDetail",
-          query: { RoomID: infos.RoomID, zone: this.zoneCode, isMyTab: 2 }
+          query: query
         })
       } else if (val == "RoomQRCode") {
         this.qrcodeUrl = this.main[row.row].RoomQRCode
         if (!!this.qrcodeUrl) {
           this.dialog.qrcode = true;
         } else {
-          this.$message("此设备没有设备二维码")
+          this.$message("此空间没有二维码")
         }
-      } else {
+      } 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;
+        }
+      }
+
+      if (!this.onlyRead && !inputData.Editable) {
+        this.$message("该信息点的值为自动生成,不可人工维护!");
+        return false;
+      }
+      if (!this.onlyRead && showTools.InputModeArr.indexOf(inputData.InputMode) == '-1') {
+        this.updateInfoPoint = val;
+        this.updateInput = tools.dataForKey(this.tableData[row.row], val);
+        this.myDialog.update = true;
         return false;
       }
     },
+    //关闭临时维护弹窗回调
+    handleCloseUpdate() {
+        this.updateInputShow = false
+        this.updateInfoPoint = ''
+        this.updateInput = ''
+    },
+    //更新临时维护信息点
+    handleClickUpdate() {
+        tools.setDataForKey(this.tableData[this.row], this.updateInfoPoint, this.updateInput)
+        this.tdChange([[this.row, this.updateInfoPoint, null, this.updateInput]], "edit")
+        this.updateInputShow = false
+        this.myDialog.update = false
+        this.updateInput = ''
+    },
     //表格发生更改
     tdChange(changeData, source) {
       if (!this.onlyRead) {
@@ -299,20 +515,18 @@ export default {
       if (params.length < 1 || this.main > this.copyMain) {
         return
       }
-      let param = {
-        data: [],
-        zone: this.zoneCode
-      }
+      let param = []
       params.map(item => {
         if (item.RoomID)
-          param.data.push({ RoomID: item.RoomID })
+          param.push({ RoomID: item.RoomID })
       })
+      params.map(i => i.ObjectType = this.zoneParam.ZoneType ? this.zoneParam.ZoneType : i.ObjectType);
       this.$confirm("此操作将删除业务空间,是否继续?", "提示", {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        deleteZone(param, res => {
+        zoneDelete(param, res => {
           this.$message.success("删除成功!")
           this.getData()
         })
@@ -337,20 +551,39 @@ export default {
         this.$message("新添加业务空间内容不能为空!")
         return
       }
-      if (this.buildFloorSelectd && this.buildFloorSelectd[0] && this.buildFloorSelectd[1]) {
-        param.BuildingId = this.buildFloorSelectd[0]
-        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: {
-          Content: [param]
+      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]
+          }
         }
       }
-      createZone(params, res => {
+
+      param.ObjectType = this.zoneParam.ZoneType ? this.zoneParam.ZoneType : this.zoneCode;
+      let params = {
+        Content: [param]
+      };
+
+      // let params = {
+      //   zone: this.zoneCode,
+      //   data: {
+      //     Content: [param]
+      //   }
+      // }
+      // createZone(params, res => {
+      //
+      //   this.$message.success("添加成功!")
+      //   this.getData()
+      // })
+
+      zoneCreate(params, res => {
         this.$message.success("添加成功!")
         this.getData()
       })
@@ -408,17 +641,35 @@ export default {
       if (param.data.Projection.indexOf('BuildingId') > -1) {
         let pa = param.data.Content.map(t => {
           return {
-            type: this.zoneCode,
-            spaceId: t.RoomID,
-            id: t.FloorId || t.BuildingId || null,
+            Type: this.zoneCode,
+            SpaceId: t.RoomID,
+            Id: t.FloorId || t.BuildingId || null,
           }
         })
-        updateRelateInSpAndBuild(pa, res => {
+        handleZoneUpdateBd(pa, res => {
           this.$message.success('修改成功')
         })
+        // Orders: "createTime desc, EquipLocalName desc, EquipLocalID desc, EquipID desc"
+        // updateRelateInSpAndBuild(pa, res => {
+        //   this.$message.success('修改成功')
+        // })
       } else {
-        param.data.Projection = []
-        updateZone(param, (res) => { })
+        // updateZone(param, (res) => {
+        // })
+        let obj = param.data.Content.map(i => {
+          i.Outline = typeof i.Outline == 'string' ? JSON.parse(i.Outline) : i.Outline
+          return {
+            ...i,
+            ObjectType: this.zoneParam.ZoneType || i.ObjectType
+          }
+        })
+        let updateParam = {
+          Content: obj,
+          Projection: param.data.Projection
+        };
+        zoneUpdate(updateParam, res => {
+          this.$message.success('更新成功')
+        })
       }
     },
     //获取被筛选掉的行号
@@ -578,18 +829,54 @@ export default {
     },
     /**  页面中的按钮事件--------------------------- */
     addSp() {
-      if (this.main && this.main.length && this.main[0].RoomID) {
-        this.hot.destroy()
-        this.hot = null
-        this.main.unshift({})
-        this.getMain()
+      this.myDialog.addSpace = true;
+      if (this.zoneCode && this.zoneCode != 'OtherZone') {
+        this.$nextTick(() => {
+          this.$refs.cascader.setValue([this.zoneCode])
+        })
+      } else if (this.zoneCode == 'OtherZone' && this.OtherValue) {
+        this.$nextTick(() => {
+          this.$refs.cascader.setValue([this.zoneCode,this.OtherValue])
+        })
+      }
+      // if (this.main && this.main.length && this.main[0].RoomID) {
+      //   this.hot.destroy()
+      //   this.hot = null
+      //   this.main.unshift({})
+      //   this.getMain()
+      // } else {
+      //   if (this.main && this.main.length) {
+      //     this.$message("请添加完成后继续添加")
+      //   } else {
+      //     this.main.unshift({})
+      //     this.getMain()
+      //   }
+      // }
+    },
+    //下一步
+    toAddSpace() {
+      if (this.addData.spaceType) {
+        this.$router.push({
+          path: "/ledger/spaceadd",
+          query: this.addData
+        });
       } else {
-        if (this.main && this.main.length) {
-          this.$message("请添加完成后继续添加")
-        } else {
-          this.main.unshift({})
-          this.getMain()
-        }
+        this.$message("请选择要添加的业务空间类型!")
+      }
+    },
+    //选择业务空间类型-添加业务空间
+    changeAddType(val, item, value) {
+      if (value.length == 2 && value[0] == "OtherZone") {
+        this.addData.spaceType = val;
+        this.addData.otherType = value[0]
+        this.addData.spaceName = `其他分区-${item.Name}`;
+        this.addData.showType = this.showType;
+        this.addData.buildFloorSelectd = this.buildFloorSelectd;
+      } else {
+        this.addData.spaceType = val;
+        this.addData.spaceName = item.Name;
+        this.addData.showType = this.showType;
+        this.addData.buildFloorSelectd = this.buildFloorSelectd;
       }
     },
     //刷新
@@ -604,16 +891,75 @@ 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()
+    },
+    addZoneBtn() {
+      this.$refs.zone.dialogFormVisible = true
+    },
+    //  其他分区类型查询
+    getOtherType() {
+      let param = {
+        Cascade: [{ Name: 'zoneType', Filters: `ProjectId='${this.projectId}'` }],
+        Filters: `Code="OtherZone"`
+      }
+      queryAllZoneType(param, res => {
+        if (res.Content[0].ZoneType && res.Content[0].ZoneType.length) {
+          this.OtherList = res.Content[0].ZoneType.map(t => {
+            t.value = t.Code
+            t.label = t.Name
+            return t
+          })
+        } else {
+          this.OtherList = []
+        }
+        if (this.otherType) {
+          this.OtherValue = this.otherType
+          this.changeOtherZone(this.otherType)
+        }
+      })
+    },
+    // 其他类型下拉change
+    changeOtherZone(val) {
+      this.zoneParam.ZoneType = val;
+      this.getZoneMessage(this.zoneParam);
+      // if (localStorage.getItem('otherZone')) {
+      //   localStorage.setItem('otherZone', val)
+      // } else {
+      //   localStorage.setItem('otherZone', val)
+      // }
+      console.log(val)
+    },
   },
+
   watch: {
     projectId() {
+      this.buildFloorData = []
+      buildFloor.getData(this.buildFloorData)
       this.setData()
       this.main = null
     },
@@ -633,10 +979,12 @@ export default {
 </script>
 <style lang="less" scoped>
 #handsontable {
+  padding: 0 10px;
   .left {
-    padding-top: 0;
-    padding-bottom: 10px;
+    padding: 0;
+    margin-bottom: 10px;
   }
+
   .no-data {
     height: 150px;
     line-height: 150px;
@@ -644,4 +992,4 @@ export default {
     color: gray;
   }
 }
-</style>
+</style>

+ 1 - 1
src/components/business_space/dialogs/addDialog/businessDialog.vue

@@ -478,7 +478,7 @@ export default {
           "filter_by_value",
           "filter_action_bar"
         ],
-        contextMenu: {
+        contextMenu: this.onlyRead ? false :{
           items: {
             remove_row: {
               name: "删除该业务空间"

+ 3 - 6
src/components/business_space/dialogs/detailsDialog.vue

@@ -45,7 +45,7 @@
 </template>
 
 <script>
-    import { deleteZone } from "@/api/scan/request";
+    import { zoneCreate } from "@/api/scan/request";
     import equipTable from "@/components/business_space/table/equipTable";
     import addEquip from "@/components/business_space/table/addEquip";
     import {
@@ -151,11 +151,8 @@
                         type: "warning"
                     })
                     .then(() => {
-                        let param = {
-                            zone: this.activeTabType.code,
-                            data: [{RoomID: this.list.id}]
-                        }
-                        deleteZone(param, res => {
+                        let param = [{RoomID: this.list.id}];
+                        zoneCreate(param, res => {
                             if (res.Result == 'success') {
                                 this.$message({ type: "success",  message: "删除成功!" })
                                 this.$emit("del")

+ 49 - 37
src/components/business_space/dialogs/list/filesDialog.vue

@@ -3,50 +3,62 @@
 -->
 
 <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
     },
-    keysArr: {
-      type: Array,
-      default: function () {
-        return []
+    props: {
+      dialog: {
+        type: Object,
+        default: function () {
+          return {
+            uploadFiles: false
+          };
+        }
+      },
+      keysArr: {
+        type: Array,
+        default: function () {
+          return []
+        }
+      },
+      read: {
+        type: Boolean,
+        default: false
       }
     },
-    read: {
-      type: Boolean,
-      default: false
-    }
-  },
-  data() {
-    return {};
-  },
-  created() { },
-  mounted() { },
-  methods: {
-    changeItem(file) {
-      console.log(file)
-      this.$emit("changeFile", file)
-    }
-  },
-};
+    data() {
+      return {};
+    },
+    created() {
+    },
+    mounted() {
+    },
+    methods: {
+      changeItem(file) {
+        this.$emit("changeFile", file)
+      },
+    },
+  };
 </script>
 <style>
-</style>
+</style>

+ 65 - 22
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;">
@@ -14,6 +14,9 @@
             clearable
           ></el-input>
           <el-button @click="searchKey" size="small">查找</el-button>
+          <el-select v-model="value" style="margin-left:10px;" @change="handleChangeType" placeholder="请选择">
+            <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
+          </el-select>
         </div>
         <el-radio-group v-model="radio" style="width:100%;">
           <el-table class="data-table" border :data="tableData" style="width: 100%" height="300px">
@@ -22,11 +25,12 @@
                 <el-radio v-model="radio" :label="scope.row">{{scope.row.venderName || "--"}}</el-radio>
               </template>
             </el-table-column>
-            <el-table-column header-align='center' prop="brand" label="品牌"></el-table-column>
+            <el-table-column header-align='center' prop="brandName" label="品牌"></el-table-column>
             <el-table-column header-align='center' prop="name" label="型号"></el-table-column>
             <el-table-column header-align='center' label="技术参数">
               <template slot-scope="scope">
-                <el-button type="text" @click="lookParam(scope.row)">技术参数</el-button>
+                <el-button type="text"  @click="lookParam(scope.row)">技术参数</el-button>
+                <el-button :disabled="scope.row.specificationId?false:true" type="text" @click="lookParam(scope.row)">技术参数</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -36,9 +40,9 @@
                 找不到想要的型号? 赶快去
                 <i style="color:#46B0FF;cursor: pointer;">厂家库</i>维护吧
             </p>
-            <my-pagination :page="page" @change="changed" style="margin-top:10px;"></my-pagination>
-        </div>       
-        
+            <my-pagination :page="page" @change="changed" style="margin-top:40px;"></my-pagination>
+        </div>
+
       </div>
     </div>
     <param-details :isLoad="isLoad" :data="data"></param-details>
@@ -51,9 +55,10 @@
   </el-dialog>
 </template>
 <script>
+
 import myPagination from "@/components/common/myPagination";
 import paramDetails from "@/components/business_space/dialogs/list/paramDetails"
-import { getSpecList } from "@/api/scan/request"
+import { getSpecList, getBrandList, getManufacturerList } from "@/api/scan/request"
 
 export default {
   components: {
@@ -77,8 +82,18 @@ export default {
     return {
       search: "", //搜索文案
       radio: "",
-      tableData: [
-      ],
+      value: "specification",//当前选择的查看类型
+      options: [{
+          value: 'specification',
+          label: '选型号'
+        }, {
+          value: 'brand',
+          label: '选生产厂家-品牌'
+        }, {
+          value: 'manufacturer',
+          label: '选生产厂家'
+      }],
+      tableData: [],
       data: {},
       isLoad: {
         paramShow: false
@@ -122,19 +137,47 @@ export default {
       }
       this.getData()
     },
+    handleChangeType(item) {
+      this.page.total = 0
+      this.tableData = []
+      this.getData()
+    },
     getData() {
-      getSpecList({
-        limit: {
-          skip: this.page.size * (this.page.currentPage - 1),
-          count: this.page.size
-        },
-        eqFamily: this.mess.deviceId,
-        name: this.search
-      }, res => {
-        this.page.total = res.totalCount
-        this.tableData = res.content
-        console.log(this.tableData)
-      })
+      if(this.value == 'specification') {//型号
+        getSpecList({
+          limit: {
+            skip: this.page.size * (this.page.currentPage - 1),
+            count: this.page.size
+          },
+          eqFamily: this.mess.deviceId,
+          name: this.search
+        }, res => {
+          this.page.total = res.totalCount
+          this.tableData = res.content
+        })
+      } else if(this.value == 'brand') {//生产厂家-品牌
+        getBrandList({
+          limit: {
+            skip: this.page.size * (this.page.currentPage - 1),
+            count: this.page.size
+          },
+          name: this.search
+        }, res => {
+          this.page.total = res.totalCount
+          this.tableData = res.content
+        })
+      } else if(this.value == 'manufacturer') {//生产厂家
+        getManufacturerList({
+          limit: {
+            skip: this.page.size * (this.page.currentPage - 1),
+            count: this.page.size
+          },
+          name: this.search
+        }, res => {
+          this.page.total = res.totalCount
+          this.tableData = res.content
+        })
+      }
     }
   },
   watch: {
@@ -142,7 +185,7 @@ export default {
       deep: true,
       handler: function () {
         if (this.dialog.firm) {
-          console.log(this.mess)
+          this.value = 'specification'
           this.changePage()
         }
       }

+ 1 - 2
src/components/business_space/dialogs/list/picDialog.vue

@@ -89,7 +89,6 @@ export default {
       let videoPics = this.videoPicArr
       let panoramas = this.panoramaArr
       this.changeKeys = picsArr.concat(videos).concat(videoPics).concat(panoramas)
-      console.log(this.changeKeys)
       this.$emit("change", this.changeKeys)
     },
 
@@ -138,4 +137,4 @@ export default {
 };
 </script>
 <style>
-</style>
+</style>

+ 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, "*")
         }
       })
     }

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

@@ -10,199 +10,243 @@
 <template>
   <div id="saga-upload">
     <div id="uploadFile">
-
       <el-upload
-        v-if="filesArr.length < max"
         class="upload-file"
-        action
+        action drag
         :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>
+        :show-file-list="false">
+        <el-button size="small" :type="isShow ===1 ? 'text':'primary'" v-if="!readOnly">点击上传</el-button>
+        <div slot="tip" class="el-upload__tip" v-if="(isShow !== 1 || isShow == undefined) && !readOnly">请上传文件,且不大于50M</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>
-        <i
-          v-if="!readOnly"
-          class="el-icon-close delete-icon"
-          style="margin-left:10px; cursor:pointer"
-          @click="deleteFile(index,item)"
-        ></i>
+      <div v-show="item && filesArr.length" v-for="(item,index) in filesArr" :key="item.Key">
+        <p class="file-list">
+          <span class="file-name" :title="item.Name">{{item.Name}}</span>
+          <i title="下载" class="el-icon-download" style="margin-left:10px; cursor:pointer" @click="download(item)"></i>
+          <i v-if="!readOnly" title="删除" class="el-icon-close delete-icon" style="margin-left:10px; cursor:pointer" @click="deleteFile(index,item)"></i>
+        </p>
       </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
-  },
-  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
+      },
+      isShow: {
+        type: Number
+      },
+      contextKey: {
+        type: [String, Object]
+      },
+      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 = []
+        }
+      },
 
-    //点击下载
-    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(item) {
+        if (item.Key) {
+          let a = document.createElement("a");
+          a.href = `/image-service/common/file_get/${item.Key}?systemId=dataPlatform`;
+          a.download = `${item.Name}`;
+          a.click();
+          document.body.removeChild(a);
+        } else {
+          this.$message({
+            message: "无该获取该文件资源链接!",
+            type: "error"
+          });
+        }
+      },
 
-      // 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 size = item.file.size;
+        if( size > 50*1024*1024 ) { //文件大于50M
+          this.$message.error('文件不可大于50M,请重新上传')
+          return false
+        }
+        else {
+          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.onloadstart = function () {
-        // 这个事件在读取开始时触发
-      };
-      reader.onprogress = function (p) {
-        // 这个事件在读取进行中定时触发
-      };
+          };
+          reader.onUploadProgress = function (progressEvent) {
+            let percent = (progressEvent.loaded / progressEvent.total * 100) | 0
+            //调用onProgress方法来显示进度条,需要传递个对象 percent为进度值
+            uploader.onProgress({percent: percent})
+          }
+          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);
 
-      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)
-              }
+                    if(vm.isShow === 1) {
+                      let oFile = {}
+                      oFile[vm.contextKey] = vm.filesArr
+                      vm.$emit("change", oFile, vm.defined);
+                    } else {
+                      vm.$emit("change", vm.filesArr, vm.defined);
+                    }
+                  } else {
+                    this.$message.error(res.data.ResultMsg)
+                  }
+                }
+              };
             }
           };
+          reader.readAsArrayBuffer(file);
         }
-      };
-      reader.readAsArrayBuffer(file);
-    }
-  },
-  watch: {
-    keysArr: function (val) {
-      this.fileFalg()
+      }
+    },
+    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;
+        }
+      }
+      .file-list {
+        .file-name {
+          display: inline-block;
+          width: 400px;
+          font-size: 12px;
+          color: #409eff;
+          overflow: hidden;
+          white-space: nowrap;
+          text-overflow: ellipsis;
+          vertical-align: top;
+          cursor: pointer;
+        }
+        .file-name:hover {
+          color: #66b1ff;
+        }
       }
     }
   }
-}
-</style>
+</style>

+ 117 - 87
src/components/business_space/lib/uploadImgsName.vue

@@ -5,14 +5,15 @@
     @click change  承接数组发生变化时触发函数
 -->
 <template>
-  <div id="sagaUploads">
+  <div id="sagaUploads" :style="{marginLeft:(isShow && imagesArr.length>2) ? '157px':'',marginTop:(isShow && imagesArr.length>2) ? '-25px':''}">
     <div class="saga-upload-images">
       <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>
@@ -45,64 +47,78 @@
   </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 {
-  components: {
-    formInput,
-    detailsDialog
-  },
-  props: {
-    keysArr: {
-      type: [Array, String]
-    },
-    readOnly: {
-      type: Boolean,
-      default: false
+  export default {
+    components: {
+      formInput,
+      detailsDialog
     },
-    max: {
-      type: [Number, String],
-      default: 6
-    },
-    accept: {
-      type: String,
-      default: "image/*"
+    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"
+      },
+      contextKey: {
+        type: [String, Object]
+      },
+      isShow: {
+        type: [Number, String]
+      },
+      defined: null,
+      videoPicArr: {
+        type: Array,
+        default: function () {
+          return []
+        }
+      }
     },
-    type: {
-      type: String,
-      default: "image"
+    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
+        }
+      };
     },
-    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: {
-    getName(name, index) {
-      console.log(this.imagesArr, "imagesArr")
-      this.imagesArr[index].name = name
-      this.$emit("change", this.imagesArr, this.defined, this.videoPicArr);
+    created() {
+      this.imageFalg();
     },
+    methods: {
+      getName(name, index) {
+
+        this.imagesArr[index].Name = name
+        if (this.isShow === 1) {
+          let oFile = {}
+          oFile[this.contextKey] = this.imagesArr
+          this.$emit("change", oFile, this.defined, this.videoPicArr);
+
+        } else {
+          this.$emit("change", this.imagesArr, this.defined, this.videoPicArr);
+
+        }
+      },
     //判断是否为空
     imageFalg() {
       let type = typeof this.keysArr;
@@ -146,7 +162,6 @@ export default {
       // 寻找表单域中的 <input type="file" ... /> 标签
       // var file = form["file"].files[0];
 
-      console.log("lalala", item)
       let file = item.file;
       // try sending
       let reader = new FileReader();
@@ -155,6 +170,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,34 +207,41 @@ 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);
+                if (vm.isShow === 1) {
+                  let oFile = {}
+                  oFile[vm.contextKey] = vm.imagesArr
+                  vm.$emit("change", oFile, vm.defined, vm.videoPicArr);
+                } else {
+                  vm.$emit("change", vm.imagesArr, vm.defined, vm.videoPicArr);
+
+                }
               }
             }
           };
@@ -314,17 +337,24 @@ export default {
 </script>
 <style lang="less">
 #sagaUploads {
+  /deep/ .el-upload--text {
+    box-sizing: border-box;
+  }
+
   overflow: hidden;
+
   .avatar-uploader {
-    height: 180px;
-    width: 180px;
-    overflow: hidden;
+    /*height: 180px;*/
+    /*width: 180px;*/
+    /*overflow: hidden;*/
+
     .el-upload {
-      width: 180px;
-      height: 180px;
+      /*width: 180px;*/
+      /*height: 180px;*/
+
       .el-upload-dragger {
-        width: 180px;
-        height: 180px;
+        width: 180px !important;
+        height: 180px !important;
         .el-icon-plus {
           display: block;
           width: 20px;

+ 9 - 3
src/components/business_space/newAddDialogs/addEquipDialog.vue

@@ -133,12 +133,14 @@ export default {
     },
     // 获取列表数据
     getTableData() {
+      this.loading = true
       let pa = {
         data: {
           Cascade: [{ Name: "equipCategory" }],
           Filters: '',
           PageNumber: this.page.pageNumber,
           PageSize: this.page.pageSize,
+          Orders: 'EquipID asc'
         },
         type: this.zone,
         spaceId: this.spaceId
@@ -157,7 +159,7 @@ export default {
         pa.data.Filters += `;EquipName contain "${this.keycode}" or EquipLocalName contain "${this.keycode}" or EquipLocalID contain "${this.keycode}"`
       }
       // 删除首尾分号
-      pa.data.Filters = pa.data.Filters.replace(/(^;)|(;$)/g,'');
+      pa.data.Filters = pa.data.Filters.replace(/(^;)|(;$)/g, '');
       if (pa.data.Filters == '') {
         delete pa.data.Filters
       }
@@ -165,14 +167,16 @@ export default {
       if (this.showType) {
         if (this.type == "Equipment") {
           // pa.data.Cascade.push({ Name: "zoneSpaceInBase" })
-          delete pa.data.Cascade;
+          pa.data.Cascade = [{ Name: "equipCategory" }];
           getEqNotInSpace(pa, res => {
+            this.loading = false
             this.getDataSuc(res, 'ZoneSpaceBaseIn')
           })
         } else {
           // pa.data.Cascade.push({ Name: "zoneSpaceForBase" })
-          delete pa.data.Cascade;
+          pa.data.Cascade = [{ Name: "equipCategory" }];
           getEqNotForSpace(pa, res => {
+            this.loading = false
             this.getDataSuc(res, 'ZoneSpaceBaseFor')
           })
         }
@@ -180,11 +184,13 @@ export default {
         if (this.type == "Equipment") {
           pa.data.Cascade.push({ Name: "zoneSpaceInBase" })
           notEqInSpaceQuery(pa, res => {
+            this.loading = false
             this.getDataSuc(res, 'ZoneSpaceBaseIn')
           })
         } else {
           pa.data.Cascade.push({ Name: "zoneSpaceForBase" })
           notEqForSpaceQuery(pa, res => {
+            this.loading = false
             this.getDataSuc(res, 'ZoneSpaceBaseFor')
           })
         }

+ 1 - 0
src/components/business_space/newAddDialogs/addSystemDialog.vue

@@ -87,6 +87,7 @@ export default {
       let pa = {
         data: {
           PageSize: 200,
+          Orders: 'SysID asc'
         },
         type: this.zone,
         spaceId: this.spaceId

+ 136 - 0
src/components/business_space/newAddDialogs/roomInFloorDialog.vue

@@ -0,0 +1,136 @@
+<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" border>
+        <el-table-column label="业务空间名称" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.RoomLocalName||scope.row.RoomName||''}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column label="所属建筑" show-overflow-tooltip min-width="100" class-name="mutiCol">
+          <template slot-scope="scope">
+            <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>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="dialogVisible = false">取 消</el-button>
+      <el-button size="small" type="primary" @click="savaRelation">确 定</el-button>
+    </span>
+  </el-dialog>
+</template>
+<script>
+import {
+  getSpaceBdFlData, // 属于多建筑楼层的空间数据
+  updateRelateInSpAndBuild, //保存业务空间与建筑楼层关系
+} from "@/api/scan/request";
+export default {
+  data() {
+    return {
+      title: '请选择业务空间所属建筑',
+      inSpaceType: '系统',
+      dialogVisible: false,
+      tableData: [],
+      loading: false,
+      headerStyle: {
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
+      }, // 列表样式
+      selections: [], // 选中项
+    }
+  },
+  props: {
+    type: {}, //equipment--equipmentFor
+    spaceId: {},
+    zone: {}, //分区类型 
+  },
+  methods: {
+    // 显示
+    showDialog() {
+      this.dialogVisible = true;
+      this.tableData = [];
+      this.getTableData();
+    },
+    // 确认
+    savaRelation() {
+      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 = {
+        Cascade: [
+          { Name: "floorlList", Cascade: [{ Name: 'building' }] }
+        ],
+        PageSize: 1000
+      }
+      getSpaceBdFlData(pa, res => {
+        this.tableData = res.Content;
+      })
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+#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>

+ 21 - 21
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>
-    <div>
-      <i class="iconfont icon-narrow" @click="reduce"></i>
+    <div v-if="config.isEdit" @click="redo">
+      <i class="iconfont icon-Anti-cancel"></i>
+    </div> -->
+    <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"></el-slider>
+      <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>
@@ -56,6 +56,7 @@ export default {
       sliderVal: 1, // 滑块值
       active: '',
       min: 1,
+      max: 1000,
       everyScale: 1, // 每份的放大倍数
       isSwitch: false, // 是否开启吸附
     }
@@ -71,7 +72,6 @@ export default {
     }
   },
   computed: {
-
   },
   methods: {
     // 移动画布
@@ -141,7 +141,7 @@ export default {
 </script>
 <style lang="less" scoped>
 #canvas-actions-box {
-  min-width: 542px;
+  // min-width: 542px;
   & > div {
     float: left;
     font-size: 20px;

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

File diff suppressed because it is too large
+ 748 - 201
src/components/business_space/newGraphy/graphy.vue


+ 19 - 17
src/components/business_space/newGraphy/unRelateBSP.vue

@@ -39,7 +39,7 @@
 <script>
 import {
   buildingQuery,
-  queryZone
+  zoneQuery
 } from "@/api/scan/request"
 export default {
   name: "unRelateBSP",
@@ -81,7 +81,10 @@ export default {
   },
   methods: {
     // 显示弹窗
-    showDialog() {
+    showDialog(buildFloor) {
+      if (buildFloor) {
+        this.floor = buildFloor;
+      }
       this.dialogVisible = true;
       this.getTableData();
     },
@@ -97,7 +100,7 @@ export default {
       this.getTableData();
     },
     // 页码
-    handleCurrentChange(val) { 
+    handleCurrentChange(val) {
       this.page.pageNumber = val;
       this.getTableData();
     },
@@ -123,34 +126,33 @@ export default {
           t.Floor.unshift({ BuildID: 'all', BuildLocalName: '全部' }, { BuildID: 'isNull', BuildLocalName: '未明确楼层' })
           return t;
         })
-        this.options.unshift({ BuildID: 'all', BuildLocalName: '全部' }, { BuildID: 'isNull', BuildLocalName: '未明确楼层' })
+        this.options.unshift({ BuildID: 'all', BuildLocalName: '全部' }, { BuildID: 'isNull', BuildLocalName: '未明确建筑' })
       })
     },
     // 查询未关联平面图的业务空间(项目下+当前分区)
     getTableData() {
       let pa = {
-        zone: this.code,
-        data: {
-          Filters: `Outline isNull`,
-          Orders: "createTime desc, RoomID asc",
-          PageSize: this.page.pageSize,
-          pageNumber: this.page.pageNumber
-        }
+        ZoneType: this.code,
+        Filters: `Outline isNull`,
+        Orders: "createTime desc, RoomID asc",
+        PageSize: this.page.pageSize,
+        pageNumber: this.page.pageNumber
       }
+
       if (this.floor[0] == 'isNull') {
-        pa.data.Filters += `;BuildingId isNull`
+        pa.BuildingId = `isnull`
       } else if (this.floor[0] && this.floor[0] != 'all') {
-        pa.data.Filters += `;BuildingId='${this.floor[0]}'`
+        pa.BuildingId = this.floor[0]
       }
       if (this.floor[1] == 'isNull') {
-        pa.data.Filters += `;FloorId isNull`
+        pa.FloorId = `isnull`
       } else if (this.floor[1] && this.floor[1] != 'all') {
-        pa.data.Filters += `;FloorId='${this.floor[1]}'`
+        pa.FloorId = this.floor[1]
       }
       if (this.keycode != '') {
-        pa.data.Filters += `;RoomLocalName contain "${this.keycode}" or RoomName contain "${this.keycode}"`
+        pa.Filters += `;RoomLocalName contain "${this.keycode}" or RoomName contain "${this.keycode}"`
       }
-      queryZone(pa, res => {
+      zoneQuery(pa, res => {
         this.page.total = res.Total;
         this.tableData = res.Content.map(t => {
           t.BNAME = this.bfData[t.BuildingId];

+ 28 - 20
src/components/business_space/newTables/eqToSpaceTable.vue

@@ -1,13 +1,13 @@
 <template>
   <div id="eqInSp">
-    <el-row>
+    <el-row v-if="hidden">
       <el-button type="primary" @click="add">添加{{inSpaceType}}</el-button>
       <el-tooltip class="item" effect="dark" :content="`可前往“全部关系总览”中,按坐标计算${typeToTips[type]}`" placement="right">
-        <el-button>按空间计算</el-button>
+        <el-button v-show="type=='Equipment'">按空间计算</el-button>
       </el-tooltip>
     </el-row>
     <div class="table-box">
-      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="headerStyle">
+      <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>
@@ -19,7 +19,7 @@
         <el-table-column :label="`${inSpaceType}类`" show-overflow-tooltip min-width="100">
           <template slot-scope="scope">
             <div>
-              {{scope.row.EquipCategory.EquipName}}
+              {{scope.row.EquipCategory?scope.row.EquipCategory.EquipName:''}}
             </div>
           </template>
         </el-table-column>
@@ -31,9 +31,9 @@
           </template>
         </el-table-column>
         <template slot="empty">
-          <div style="height: 60%;transform: translateY(50%);">
+          <div style="height: 60%;transform: translateY(50%);lineHeight:20px;">
             <i class="icon-wushuju iconfont"></i>
-            可前往“全部关系总览”中,按坐标计算{{typeToTips[type]}}
+            {{type=='Equipment'?`可前往“全部关系总览”中,按坐标计算${typeToTips[type]}`:'无数据'}}
           </div>
         </template>
       </el-table>
@@ -45,7 +45,7 @@
 
 <script>
 import {
-  queryZone,
+  zoneQuery,
   eqInSpaceDelete, //设备所在业务空间--删除关系
   eqForSpaceDelete, //设备服务业务空间--删除关系
 } from "@/api/scan/request";
@@ -71,7 +71,8 @@ export default {
       typeToTips: {
         Equipment: '空间内的设备',
         EquipmentFor: '服务于空间的设备',
-      }
+      },
+      hidden: true,
     };
   },
   props: {
@@ -80,6 +81,7 @@ export default {
   },
   created() {
     this.getTableData()
+    this.changeContentStyle();
   },
   methods: {
     // 删除关系
@@ -128,19 +130,19 @@ export default {
     },
     // 获取列表数据
     getTableData() {
+      this.loading = true;
       let pa = {
-        data: {
-          Filters: `RoomID='${this.params.RoomID}'`,
-          Cascade: [
-            {
-              Name: this.type.replace(this.type[0], this.type[0].toLowerCase()),
-              Cascade: [{ Name: 'equipCategory' }]
-            }
-          ]
-        },
-        zone: this.params.zone
+        Filters: `RoomID='${this.params.RoomID}'`,
+        Cascade: [
+          {
+            Name: this.type.replace(this.type[0], this.type[0].toLowerCase()),
+            Cascade: [{ Name: 'equipCategory' }]
+          }
+        ],
+        ZoneType: this.params.zone
       }
-      queryZone(pa, res => {
+      zoneQuery(pa, res => {
+        this.loading = false;
         this.tableData = res.Content[0][this.type] || []
         this.tableData.map(t => {
           t.SpaceId = res.Content[0].RoomID
@@ -150,13 +152,19 @@ export default {
     },
     // 添加设备
     add() {
-      this.$refs.addEqDialog.floor = [this.params.BuildingId, this.params.FloorId];
+      this.$refs.addEqDialog.floor = this.params.buildFloorSelectd;
       this.$refs.addEqDialog.showDialog()
+    },
+    changeContentStyle() {
+      this.$route.name == "spaceLedger" ? this.hidden = false : this.hidden = true;
     }
   },
   watch: {
     type() {
       this.getTableData()
+    },
+    params() {
+      this.getTableData()
     }
   }
 };

+ 22 - 12
src/components/business_space/newTables/syInSpaceTable.vue

@@ -1,6 +1,6 @@
 <template>
   <div id="eqInSp">
-    <el-row>
+    <el-row v-show="hidden">
       <el-button type="primary" @click="add">添加{{inSpaceType}}</el-button>
       <el-tooltip class="item" effect="dark" :content="`可前往“全部关系总览”中,按坐标计算${typeToTips[type]}`" placement="right">
         <el-button>按空间计算</el-button>
@@ -24,7 +24,7 @@
           </template>
         </el-table-column>
         <template slot="empty">
-          <div style="height: 60%;transform: translateY(50%);">
+          <div style="height: 60%;transform: translateY(50%);lineHeight:20px;">
             <i class="icon-wushuju iconfont"></i>
             可前往“全部关系总览”中,按坐标计算{{typeToTips[type]}}
           </div>
@@ -37,7 +37,7 @@
 
 <script>
 import {
-  queryZone,
+  zoneQuery,
   syInSpaceDelete
 } from "@/api/scan/request";
 import { mapGetters } from "vuex";
@@ -61,7 +61,9 @@ export default {
       tableData: [], //列表数据
       typeToTips: {
         generalSystem: '空间内的系统',
-      }
+      },
+      hidden: true,
+      loading: false
     };
   },
   props: {
@@ -69,7 +71,8 @@ export default {
     type: {}
   },
   created() {
-    this.getTableData()
+    this.getTableData();
+    this.changeContentStyle();
   },
   methods: {
     // 删除关系
@@ -89,7 +92,7 @@ export default {
       })
     },
     // 删除关系
-    deleteSyInSpace(pa){
+    deleteSyInSpace(pa) {
       syInSpaceDelete(pa, res => {
         this.$message.success('删除成功');
         this.getTableData();
@@ -97,14 +100,14 @@ export default {
     },
     // 获取列表数据
     getTableData() {
+      this.loading = true;
       let pa = {
-        data: {
-          Cascade: [{ Name: "generalSystem" }],
-          Filters: `RoomID="${this.params.RoomID}"`,
-        },
-        zone: this.params.zone
+        Cascade: [{ Name: "generalSystem" }],
+        Filters: `RoomID="${this.params.RoomID}"`,
+        ZoneType: this.params.zone
       }
-      queryZone(pa, res => {
+      zoneQuery(pa, res => {
+        this.loading = false;
         this.tableData = res.Content[0].GeneralSystem || [];
         this.tableData.map(t => {
           t.SpaceId = res.Content[0].RoomID;
@@ -115,11 +118,18 @@ export default {
     // 添加系统
     add() {
       this.$refs.addSyDialog.showDialog()
+    },
+    changeContentStyle() {
+      // 在辅助屏不显示添加按钮,动态设置高度
+      this.$route.name == "spaceLedger" ? this.hidden = false : this.hidden = true;
     }
   },
   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()

+ 1 - 0
src/components/common/handsontable.vue

@@ -166,6 +166,7 @@
                     sortIndicator: true, //添加排序
                     renderAllRows: true,
                     autoColumnSize: true,
+                    // observeChanges: false, //启用observeChanges插件
                     language: "zh-CN",
                     manualColumnResize: true,
                     manualColumnMove: true,

+ 70 - 172
src/components/config_point/dictionaryCascader.vue

@@ -1,207 +1,72 @@
 <template>
   <div>
     <el-form ref="form" :rules='rules' :model="form">
-      <el-form-item prop="dict">
-        <el-cascader style='width: 100%;' :options='options' v-model='form.dict' @active-item-change='handleChange' :props='props' filterable
-          @change="changeSelect" ref="dictCas"></el-cascader>
+      <el-form-item prop="dict" class="cascader-container">
+        <el-cascader-multi :data='options' v-model='form.dict' :value-key='props.value' :label-key='props.label' :children-key='props.children'
+          filterable :popper-class="'select'" @change="changeSelect" ref="dictCas" :only-last="true" :no-data-text='"无数据"'>
+        </el-cascader-multi>
+        <el-tooltip class="item" effect="dark" :content="`于${cacheTime}缓存,点击重新缓存`" placement="top">
+          <el-button icon="el-icon-refresh" class="update-button" @click="getDictionary"></el-button>
+        </el-tooltip>
       </el-form-item>
     </el-form>
   </div>
 </template>
 <script>
-import {
-  getDataDictionary,//查询信息点
-  queryPhysicsAllType,//查询所有部件类型
-  queryDictionaryHead,//查询所有空间类型
-
-} from "@/api/scan/request"
-import { mapGetters, mapActions } from "vuex";
+import { mapGetters, mapMutations, mapActions } from "vuex";
 import tools from "@/utils/scan/tools";
 export default {
   data() {
     return {
-      options: [
-        {
-          Code: 'Pj',
-          Name: '项目',
-          children: []
-        }, {
-          Code: 'Bd',
-          Name: '建筑',
-          children: []
-        }, {
-          Code: 'Fl',
-          Name: '楼层',
-          children: []
-        }, {
-          Code: 'Eq',
-          Name: '设备',
-          children: []
-        }, {
-          Code: 'Ec',
-          Name: '部件',
-          children: []
-        }, {
-          Code: 'Sy',
-          Name: '系统',
-          children: []
-        }, {
-          Code: 'Sp',
-          Name: '空间',
-          children: []
-        }, {
-          Code: 'VOTn',
-          Name: '租户',
-          children: []
-        },
-      ],
+      options: [],
       form: {
         dict: [],
       },
       props: {
-        value: 'Code',
-        label: 'Name',
-        children: 'children'
+        value: 'InfoPointCode',
+        label: 'InfoPointName',
+        children: 'Content'
       },
       rules: {
         dict: [{ required: true, message: '请选择对应数据字典', trigger: 'blur' }]
       },
-      typeRelation: {
-        Pj: 'Project',
-        Bd: 'Building',
-        Fl: 'Floor',
-        VOTn: 'Tenant',
-      },
-      timer: null
     }
   },
+  computed: {
+    ...mapGetters("project", ["dictionary", "cacheTime"]),
+  },
   created() {
-    this.getAllData()
+    if (!this.dictionary.length) {
+      this.getDictionary().then(res => {
+        this.getDictSuc(res.Content)
+      })
+    } else {
+      this.getDictSuc(this.dictionary);
+    }
   },
   methods: {
-    //选择
-    handleChange(val) {
-      let type = val[0];
-      let singleStr = "Pj-Bd-Fl-VOTn";
-      console.log(val)
-      if (type == "Eq" && val.length == 2) {
-        this.getDataPoint(val[1])
-      } else if (type == "Ec" && val.length == 2) {
-        this.getDataPoint(val[1])
-      } else if (type == "Sy" && val.length == 3) {
-        this.getDataPoint(val[2])
-      } else if (type == "Sp" && val.length == 2) {
-        this.getDataPoint(val[1])
-      } else if (singleStr.indexOf(type) > -1) {
-        this.hasChildren(type) && this.getDataPoint(type)
-      }
-    },
+    ...mapActions('project', ['getDictionary']),
     //获取物理世界所有设备类型
-    getAllData() {
-      queryPhysicsAllType('Equipment', res => {
-        this.options[3].children = this.formatOptions(res.Content)
-      })
-      queryPhysicsAllType('Component', res => {
-        this.options[4].children = this.formatOptions(res.Content)
-      })
-      queryPhysicsAllType('Major-System', res => {
-        let data = JSON.parse(JSON.stringify(res.Content).replace(/ListClassDef/g, 'children'));
-        this.options[5].children = this.formatOptions(data)
-      })
-      let param1 = {
-        Distinct: true,
-        Filters: "ParentId='Space'"
-      }
-      queryDictionaryHead(param1, res => {
-        this.options[6].children = this.formatOptions(res.Content)
-      })
-    },
-    //格式化options数据
-    formatOptions(arr) {
-      return arr.map(item => {
-        return {
-          Code: item.Code,
-          Name: item.Name,
-          children: item.children && item.children.length ? this.formatOptions(item.children) : []
-        }
-      })
-    },
-    //请求信息点
-    getDataPoint(type) {
-      let param = {
-        data: {
-          Filters: "InputMode='M' or InputMode='L'",
-          PageNumber: 1,
-          PageSize: 500,
-          Orders: 'InfoPointName asc'
-        },
-        type: this.typeRelation[type] || type
-      }
-      getDataDictionary(param, res => {
-        let tempArr = res.Content.map(item => {
-          return {
-            Code: item.InfoPointCode,
-            Name: item.InfoPointName
-          }
-        })
-        this.pointDataSource = {}
-        res.Content.map(item => {
-          let code = item.InfoPointCode
-          this.pointDataSource[code] = item
-        })
-        this.timer = setTimeout(() => {
-          if (this.interval()) {
-            this.pushPoints(this.options, tempArr, type);
-            this.changeSelect(this.form.dict);
-            clearTimeout(this.timer);
-            this.timer = null;
-            return
-          }
-          this.timer()
-        }, 100);
-      })
-    },
-    interval() {
-      for (let i = 0; i < this.options.length; i++) {
-        if (this.options[i].children.length > 0) {
-          return true;
-        }
-      }
-      return false;
-    },
-    //根据返回数据拼接options
-    pushPoints(options, arr, Code) {
-      options.map(option => {
-        if (option.Code == Code) {
-          option.children = arr;
-        } else {
-          if (option.children) {
-            this.pushPoints(option.children, arr, Code)
-          }
-        }
-      })
+    getDictSuc(list) {
+      this.options = this.transformList(list);
+      this.changeSelect(this.form.dict);
     },
     changeSelect(val) {
-      if (this.$refs.dictCas.getCheckedNodes()[0]) {
-        let labels = this.$refs.dictCas.getCheckedNodes()[0].pathLabels
-        this.$emit('change', { val: val, labels: labels })
-      }
-    },
-    //减少请求次数
-    hasChildren(Code) {
-      let flag = true;
-      this.options.map(option => {
-        if (option.Code == Code && option.children.length) {
-          flag = false;
+      setTimeout(() => {
+        if (this.$refs.dictCas) {
+          let labels = this.$refs.dictCas.selectedLabels;
+          let data = {};
+          this.$refs.dictCas.selectedNodes.forEach(t => {
+            let key = t.InfoPointCode;
+            data[key] = t;
+          });
+          this.$emit('change', { val: val, labels: labels, data: data })
         }
-      })
-      return flag;
+      }, 500)
     },
     //设置值
     setCascaderVal(value) {
       this.form.dict = tools.deepCopy(value)
-      value.splice(value.length - 1, 1)
-      this.handleChange(value)
     },
     //校验是否选择
     validate(cb) {
@@ -213,8 +78,41 @@ export default {
         }
       })
     },
+    transformList(list) {
+      let arr = [];
+      arr = list.map(t => {
+        if (t.Content) {
+          if (!t.Content.length) {
+            t.Content = [{ InfoPointName: '暂无可对应信息点', disabled: true }]
+          } else {
+            t.Content = this.transformList(t.Content);
+          }
+        }
+        return t;
+      })
+      return arr;
+    }
   }
 }
 </script>
 <style lang="less" scoped>
-</style>
+.cascader-container.el-form-item--small.el-form-item {
+  margin-bottom: 0;
+  .el-form-item__content div:nth-child(1) {
+    width: 89% !important;
+    display: block;
+    float: left;
+    /deep/ .el-input .el-input__inner {
+      border-radius: 4px 0 0 4px;
+      vertical-align: bottom;
+    }
+  }
+  .update-button {
+    display: block;
+    height: 32px;
+    float: left;
+    border-left: 0;
+    border-radius: 0 4px 4px 0;
+  }
+}
+</style>

+ 4 - 0
src/components/config_point/location_flag.vue

@@ -97,6 +97,10 @@
                     this.$message("请确定输入字符不为空")
                     return false
                 }
+                let flag = this.queryLocaltionArr.map(item => item.Name).indexOf(param.Name) > -1;
+                if (flag) {
+                    return this.$message.warning('已添加过此标签');
+                }
                 addLocaltionFlag(param,res => {
                     this.queryData()
                     this.$message.success("添加成功")

+ 3 - 3
src/components/config_point/step3_edit/auto_handle.vue

@@ -1,8 +1,8 @@
 <template>
     <el-form ref='form' :rules='rules' :model='form' label-width='140px'>
-        <el-form-item v-if='devFlag' ref='form' label='对象标识' prop='EquipmentMark'>
+        <!-- <el-form-item v-if='devFlag' ref='form' label='对象标识' prop='EquipmentMark'>
             <el-input v-model='form.EquipmentMark'></el-input>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item
             label='原始点位值单位'
             prop='unit'
@@ -31,7 +31,7 @@ export default {
                 unit: [],
             },
             rules: {
-                EquipmentMark: [{ required: true, message: '请输入对象标识', trigger: 'blur' }],
+                // EquipmentMark: [{ required: true, message: '请输入对象标识', trigger: 'blur' }],
             }
         }
     },

+ 5 - 3
src/components/config_point/step3_edit/enum_handle.vue

@@ -1,9 +1,9 @@
 <template>
     <div class='edit-box'>
         <el-form ref='form' :rules='rules' :model='form' label-width='140px'>
-            <el-form-item v-if='devFlag' label='对象标识' prop='EquipmentMark'>
+            <!-- <el-form-item v-if='devFlag' label='对象标识' prop='EquipmentMark'>
                 <el-input v-model='form.EquipmentMark'></el-input>
-            </el-form-item>
+            </el-form-item> -->
 
             <ul class='point-box'>
                 <span class='left'>如果</span>
@@ -47,7 +47,7 @@ export default {
                 pointArr: [{ from: '', to: '' }]
             },
             rules: {
-                EquipmentMark: [{ required: true, message: '请输入对象标识', trigger: 'blur' }]
+                // EquipmentMark: [{ required: true, message: '请输入对象标识', trigger: 'blur' }]
             }
         }
     },
@@ -112,6 +112,8 @@ export default {
             position: absolute;
             top: -35px;
             left: 23px;
+            margin: 0;
+            padding: 0;
         }
         .right {
             position: absolute;

+ 3 - 3
src/components/config_point/step3_edit/formula_handle.vue

@@ -1,9 +1,9 @@
 <template>
     <div class='edit-box'>
         <el-form ref='form' :rules='rules' :model='form' label-width='140px'>
-            <el-form-item v-if='devFlag' label='对象标识' prop='EquipmentMark'>
+            <!-- <el-form-item v-if='devFlag' label='对象标识' prop='EquipmentMark'>
                 <el-input v-model='form.EquipmentMark'></el-input>
-            </el-form-item>
+            </el-form-item> -->
         </el-form>
         <div class='formula-box'>
             <p>原始点位</p>
@@ -53,7 +53,7 @@ export default {
             },
             extract: true,
             rules: {
-                EquipmentMark: [{ required: true, message: '请输入对象标识', trigger: 'blur' }]
+                // EquipmentMark: [{ required: true, message: '请输入对象标识', trigger: 'blur' }]
             },
             subStrVal: false,
             from: 1,

+ 375 - 243
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>
@@ -32,26 +32,35 @@
       <el-form class='form' :rules='rules' ref='form' :model='form' label-width='140px'>
         <el-form-item label='对应数据字典' prop='diction'>
           <dictionary-cas @change="changeDictionaryCas" ref="dictionaryCas"></dictionary-cas>
-          <div class='dict'>
+        </el-form-item>
+        <el-form-item label='对象标识' prop="EquipmentMark">
+          <el-input v-model='form.EquipmentMark'></el-input>
+        </el-form-item>
+        <template v-for="(it,index) in typeList">
+          <div class='dict' :key="index">
+            <label class="el-form-item__label" style="width:140px;">信息点名称:</label><span style="line-height:40px">{{it.name||''}}</span>
             <p class='btm'>
-              <el-input readonly type='textarea' :rows='2' placeholder='信息点的单位及值的说明' v-model='ValueDescription'></el-input>
+              <el-input readonly type='textarea' :rows='2' placeholder='信息点的单位及值的说明' v-model='it.ValueDescription'>
+              </el-input>
+              <el-form-item style="margin-top:15px;" label='值处理方式' prop='DataRuleType'>
+                <el-select v-model='it.DataRuleType' placeholder='请选择'>
+                  <el-option v-for='item in handleTypeArr' :key='item.value' :label='item.label' :value='item.value'></el-option>
+                </el-select>
+              </el-form-item>
             </p>
+            <!-- components -->
+            <no-handle :ref='"noHandle"+index' v-if='it.DataRuleType == "无需处理,直接使用"' :noHandleShow='noHandleShow'></no-handle>
+            <auto-handle :ref='"autoHandle"+index' v-else-if='it.DataRuleType == "需自动单位转换"' :unitObj='it.unitObj' :autoHandleShow='autoHandleShow'>
+            </auto-handle>
+            <enum-handle :ref='"enumHandle"+index' v-else-if='it.DataRuleType == "需按设置枚举转换"' :enumHandleShow='enumHandleShow'></enum-handle>
+            <formula-handle :ref='"formulaHandle"+index' v-else-if='it.DataRuleType == "需按公式转换"' :formulaHandleShow='formulaHandleShow'>
+            </formula-handle>
+            <split-handle :ref='"splitHandle"+index' v-else-if='it.DataRuleType == "需拆分处理"' :splitHandleShow='splitHandleShow'></split-handle>
           </div>
-        </el-form-item>
-        <el-form-item label='值处理方式' prop='DataRuleType'>
-          <el-select v-model='form.DataRuleType' placeholder='请选择'>
-            <el-option v-for='item in handleTypeArr' :key='item.value' :label='item.label' :value='item.value'></el-option>
-          </el-select>
-        </el-form-item>
-        <!-- components -->
-        <no-handle ref='noHandle' v-if='form.DataRuleType == "无需处理,直接使用"' :noHandleShow='noHandleShow'></no-handle>
-        <auto-handle ref='autoHandle' v-else-if='form.DataRuleType == "需自动单位转换"' :unitObj='unitObj' :autoHandleShow='autoHandleShow'></auto-handle>
-        <enum-handle ref='enumHandle' v-else-if='form.DataRuleType == "需按设置枚举转换"' :enumHandleShow='enumHandleShow'></enum-handle>
-        <formula-handle ref='formulaHandle' v-else-if='form.DataRuleType == "需按公式转换"' :formulaHandleShow='formulaHandleShow'></formula-handle>
-        <split-handle ref='splitHandle' v-else-if='form.DataRuleType == "需拆分处理"' :splitHandleShow='splitHandleShow'></split-handle>
+        </template>
       </el-form>
       <div class='btn-box'>
-        <el-button type='primary' @click='save'>保存</el-button>
+        <el-button type='primary' @click='save' :disabled="!cacheTime" :loading="!cacheTime">保存</el-button>
       </div>
     </div>
   </div>
@@ -72,7 +81,7 @@ import dictionaryCas from '@/components/config_point/dictionaryCascader'
 export default {
   name: 'point_config_step3_edit',
   computed: {
-    ...mapGetters('project', ['projectId', 'datasourceId', 'protocolType'])
+    ...mapGetters('project', ['projectId', 'datasourceId', 'protocolType', 'cacheTime'])
   },
   data() {
     return {
@@ -82,14 +91,16 @@ export default {
       dataDict: {}, //数据字典
       InfomationPoint: null, //信息点
       unitObj: {}, //传给自动单位转换的obj
-      ValueDescription: '', //值/点位描述
+      ValueDescription: {}, //值/点位描述
       form: {
         diction: '1',//占位
-        DataRuleType: '无需处理,直接使用'
+        DataRuleType: '无需处理,直接使用',
+        EquipmentMark: ''
       },
       rules: {
         DataRuleType: [{ required: true, message: '请选择值处理方式', trigger: 'change' }],
-        diction: [{ required: true }]
+        diction: [{ required: true }],
+        EquipmentMark: [{ required: true, message: '请输入对象标识', trigger: 'blur' }],
       },
       handleTypeArr: [
         {
@@ -119,7 +130,9 @@ export default {
       enumHandleShow: {},
       formulaHandleShow: {},
       splitHandleShow: {},
-      dictionaryData: []
+      dictionaryData: [],
+      typeList: [],
+      pointToRelationID: {}, //保存信息点->relationid map
     }
   },
   props: {
@@ -139,209 +152,253 @@ export default {
   methods: {
     //保存
     save() {
+      if (!this.form.EquipmentMark) {
+        this.errMsg();
+        return false;
+      }
       this.$refs.dictionaryCas.validate(valid => {
         if (valid) {
-          var flag = this.form.DataRuleType
-          switch (flag) {
-            case '无需处理,直接使用':
-              this.$refs['noHandle'].getForm(noHandle => {
-                if (noHandle) {
-                  this.saveForm(this.form, noHandle)
-                } else {
-                  this.errMsg()
-                }
-              })
-              break
-            case '需自动单位转换':
-              this.$refs['autoHandle'].getForm(autoHandle => {
-                if (autoHandle) {
-                  this.saveForm(this.form, autoHandle)
-                } else {
-                  this.errMsg()
-                }
-              })
-              break
-            case '需按设置枚举转换':
-              this.$refs['enumHandle'].getForm(enumHandle => {
-                if (enumHandle) {
-                  this.saveForm(this.form, enumHandle)
-                } else {
-                  this.errMsg()
-                }
-              })
-              break
-            case '需按公式转换':
-              this.$refs['formulaHandle'].getForm(formulaHandle => {
-                if (formulaHandle) {
-                  this.saveForm(this.form, formulaHandle)
-                } else {
-                  this.errMsg()
-                }
-              })
-              break
-            case '需拆分处理':
-              this.$refs['splitHandle'].getForm(splitHandle => {
-                if (splitHandle) {
-                  this.saveForm(this.form, splitHandle)
-                } else {
-                  this.errMsg()
-                }
-              })
-              break
+          for (let i = 0; i < this.typeList.length; i++) {
+            let flag = this.typeList[i].DataRuleType
+            switch (flag) {
+              case '无需处理,直接使用':
+                let componnoHandle = `noHandle${i}`
+                this.$refs[componnoHandle][0].getForm(noHandle => {
+                  if (noHandle) {
+                    this.typeList[i].other = noHandle
+                    // this.saveForm(this.form, noHandle)
+                  } else {
+                    this.errMsg();
+                    return false;
+                  }
+                })
+                break
+              case '需自动单位转换':
+                let componautoHandle = `autoHandle${i}`
+                this.$refs[componautoHandle][0].getForm(autoHandle => {
+                  if (autoHandle) {
+                    this.typeList[i].other = autoHandle
+                    // this.saveForm(this.form, autoHandle)
+                  } else {
+                    this.errMsg()
+                    return false;
+                  }
+                })
+                break
+              case '需按设置枚举转换':
+                let componenumHandle = `enumHandle${i}`
+                this.$refs[componenumHandle][0].getForm(enumHandle => {
+                  if (enumHandle) {
+                    this.typeList[i].other = enumHandle
+                    // this.saveForm(this.form, enumHandle)
+                  } else {
+                    this.errMsg()
+                    return false;
+                  }
+                })
+                break
+              case '需按公式转换':
+                let componformulaHandle = `formulaHandle${i}`
+                this.$refs[componformulaHandle][0].getForm(formulaHandle => {
+                  if (formulaHandle) {
+                    this.typeList[i].other = formulaHandle
+                    // this.saveForm(this.form, formulaHandle)
+                  } else {
+                    this.errMsg()
+                    return false;
+                  }
+                })
+                break
+              case '需拆分处理':
+                let componsplitHandle = `splitHandle${i}`
+                this.$refs[componsplitHandle][0].getForm(splitHandle => {
+                  if (splitHandle) {
+                    this.typeList[i].other = splitHandle
+                    // this.saveForm(this.form, splitHandle)
+                  } else {
+                    this.errMsg()
+                    return false;
+                  }
+                })
+                break
+            }
           }
+          this.saveForm()
         } else {
           this.errMsg()
           return false
         }
       })
     },
-    saveForm(basic, other) {
-      let type = basic.DataRuleType
-      let basicParams = {
-        InfomationPointCode: this.dictionaryData[this.dictionaryData.length - 1], //信息点code
-        InfomationPoint: this.dictionaryNames[this.dictionaryNames.length - 1], //信息点名称
-        DataRuleType: basic.DataRuleType, //值处理方式
-        DataSourceId: this.datasourceId, //数据源id
-        PointId: this.editData.Point.Id, //点位ID
-        Type: this.dictionaryNames[0], //一级分类名称
-        TypeCode: this.dictionaryData[0], //一级分类code
-      }
-      if (this.dictionaryData.length == 3) {
-        //设备-部件-空间
-        basicParams.EquipmentTypeCode = this.dictionaryData[1]
-        basicParams.EquipmentType = this.dictionaryNames[1]
-      } else if (this.dictionaryData.length == 4) { //专业系统
-        basicParams.SpecialtyCode = this.dictionaryData[1]
-        basicParams.Specialty = this.dictionaryNames[1]
-        basicParams.SystemCode = this.dictionaryData[2]
-        basicParams.System = this.dictionaryNames[2]
-        basicParams.EquipmentTypeCode = basicParams.SystemCode  //为了配置从动参取值存储
-        basicParams.EquipmentType = basicParams.System
-      }
+    saveForm() {
       let updateParams = {
         data: {
           Content: [{ Id: this.editData.Point.Id }]
         },
         type: this.protocolType
       }
-      let otherParams = {}
-      switch (type) {
-        case '无需处理,直接使用':
-          otherParams = {
-            EquipmentMark: other.EquipmentMark
-          }
-          updateParams.data.Content[0].EquipmentMark = other.EquipmentMark
-          break
-        case '需自动单位转换':
-          let DataRuleContent1 = JSON.stringify([
-            {
-              seq: 1,
-              ruletype: 'type1',
-              content: [
-                {
-                  from: other.unit[0] + '-' + other.unit[1],
-                  to: this.unitObj.unit
-                }
-              ]
-            }
-          ])
-          otherParams = {
-            DataRuleContent: DataRuleContent1,
-            EquipmentMark: other.EquipmentMark
+      let params = this.typeList.map((t, i) => {
+        let temp = this.dictionaryData[i],
+          tempNames = t.name.split('-');
+        let eachData = {
+          InfomationPointCode: temp[temp.length - 1],
+          InfomationPoint: tempNames[tempNames.length - 1],
+          DataRuleType: t.DataRuleType,
+          DataSourceId: this.datasourceId, //数据源id
+          PointId: this.editData.Point.Id, //点位ID
+          TypeCode: temp[0],
+          Type: tempNames[0],
+          EquipmentMark: this.form.EquipmentMark
+        }
+        if (temp.length == 3) {
+          //设备-部件-空间
+          eachData.EquipmentTypeCode = temp[1]
+          eachData.EquipmentType = tempNames[1]
+          let key = `${eachData.TypeCode}-${eachData.EquipmentTypeCode}-${eachData.InfomationPointCode}`
+          if (this.pointToRelationID[key]) {
+            eachData.Id = this.pointToRelationID[key]
           }
-          updateParams.data.Content[0].EquipmentMark = other.EquipmentMark
-          break
-        case '需按设置枚举转换':
-          let DataRuleContent2 = other.pointArr.length
-            ? JSON.stringify([{ seq: 1, ruletype: 'type2', content: other.pointArr }])
-            : undefined
-          otherParams = {
-            EquipmentMark: other.EquipmentMark,
-            DataRuleContent: DataRuleContent2
+        } else if (temp.length == 4) {
+          eachData.SpecialtyCode = temp[1]
+          eachData.Specialty = tempNames[1]
+          eachData.SystemCode = temp[2]
+          eachData.System = tempNames[2]
+          eachData.EquipmentTypeCode = eachData.SystemCode  //为了配置从动参取值存储
+          eachData.EquipmentType = eachData.System
+          let key = `${eachData.TypeCode}-${eachData.SpecialtyCode}-${eachData.SystemCode}-${eachData.InfomationPointCode}`
+          if (this.pointToRelationID[key]) {
+            eachData.Id = this.pointToRelationID[key]
           }
-          updateParams.data.Content[0].EquipmentMark = other.EquipmentMark
-          break
-        case '需按公式转换':
-          let subRule = other.from
-            ? {
-              seq: 1,
-              ruletype: 'type4',
-              content: [
-                {
-                  from: other.from,
-                  to: other.to
-                }
-              ]
-            }
-            : undefined
-          let extractRule = {
-            seq: 2,
-            ruletype: 'type5',
-            content: other.extract
-              ? [
-                {
-                  extract: 'number'
-                }
-              ]
-              : []
+        } else if (temp.length == 2) {
+          let key = `${eachData.TypeCode}-${eachData.InfomationPointCode}`
+          if (this.pointToRelationID[key]) {
+            eachData.Id = this.pointToRelationID[key]
           }
-          let countRule = other.mark
-            ? {
-              seq: 3,
-              ruletype: 'type6',
-              content: [
-                {
-                  calculationtype: other.mark,
-                  value: other.markValue
-                }
-              ]
+        }
+        let type = t.DataRuleType;
+        updateParams.data.Content[0].EquipmentMark = eachData.EquipmentMark
+        switch (type) {
+          case '无需处理,直接使用':
+            // otherParams = {
+            //   EquipmentMark: other.EquipmentMark
+            // }
+            // updateParams.data.Content[0].EquipmentMark = other.EquipmentMark
+            break
+          case '需自动单位转换':
+            let DataRuleContent1 = JSON.stringify([
+              {
+                seq: 1,
+                ruletype: 'type1',
+                content: [
+                  {
+                    from: t.other.unit[0] + '-' + t.other.unit[1],
+                    to: this.unitObj[eachData.InfomationPointCode].unit
+                  }
+                ]
+              }
+            ])
+            eachData.DataRuleContent = DataRuleContent1;
+            // otherParams = {
+            //   DataRuleContent: DataRuleContent1,
+            //   EquipmentMark: other.EquipmentMark
+            // }
+            // updateParams.data.Content[0].EquipmentMark = other.EquipmentMark
+            break
+          case '需按设置枚举转换':
+            let DataRuleContent2 = t.other.pointArr.length
+              ? JSON.stringify([{ seq: 1, ruletype: 'type2', content: t.other.pointArr }])
+              : undefined
+            // otherParams = {
+            //   EquipmentMark: other.EquipmentMark,
+            //   DataRuleContent: DataRuleContent2
+            // }
+            eachData.DataRuleContent = DataRuleContent2;
+            // updateParams.data.Content[0].EquipmentMark = other.EquipmentMark
+            break
+          case '需按公式转换':
+            let subRule = t.other.from
+              ? {
+                seq: 1,
+                ruletype: 'type4',
+                content: [
+                  {
+                    from: t.other.from,
+                    to: t.other.to
+                  }
+                ]
+              }
+              : undefined
+            let extractRule = {
+              seq: 2,
+              ruletype: 'type5',
+              content: t.other.extract
+                ? [
+                  {
+                    extract: 'number'
+                  }
+                ]
+                : []
             }
-            : undefined
+            let countRule = t.other.mark
+              ? {
+                seq: 3,
+                ruletype: 'type6',
+                content: [
+                  {
+                    calculationtype: t.other.mark,
+                    value: t.other.markValue
+                  }
+                ]
+              }
+              : undefined
 
-          let DataRuleContent3 = []
-          if (subRule) {
-            DataRuleContent3.push(subRule)
-          }
-          DataRuleContent3.push(extractRule)
-          if (countRule) {
-            DataRuleContent3.push(countRule)
-          }
-          DataRuleContent3 = DataRuleContent3.length ? JSON.stringify(DataRuleContent3) : undefined
-          otherParams = {
-            EquipmentMark: other.EquipmentMark,
-            DataRuleContent: DataRuleContent3
-          }
-          updateParams.data.Content[0].EquipmentMark = other.EquipmentMark
-          break
-        case '需拆分处理':
-          let SplitPoints = other.devArr.length ? other.devArr : undefined
-          let DataRuleContent4 = undefined
-          var enum5 = null
-          if (other.tranfVal) {
-            enum5 = { seq: 2, ruletype: 'type2', content: other.pointArr }
-          } else {
-            enum5 = { seq: 2, ruletype: 'type2', content: [] }
-          }
-          SplitPoints.forEach(ele => {
-            let cutStr = {
-              seq: 1,
-              ruletype: 'type4',
-              content: [
-                {
-                  from: ele.SplitStart,
-                  to: ele.SplitEnd
-                }
-              ]
+            let DataRuleContent3 = []
+            if (subRule) {
+              DataRuleContent3.push(subRule)
             }
-            ele.DataRuleContent = JSON.stringify([cutStr, enum5])
-          })
-          otherParams = {
-            SplitPoints: SplitPoints
-          }
-          updateParams.data.Content[0].EquipmentMark = other.eqMark
-          break
-      }
-      let params = [Object.assign(basicParams, otherParams)]
+            DataRuleContent3.push(extractRule)
+            if (countRule) {
+              DataRuleContent3.push(countRule)
+            }
+            DataRuleContent3 = DataRuleContent3.length ? JSON.stringify(DataRuleContent3) : undefined
+            eachData.DataRuleContent = DataRuleContent3;
+            // otherParams = {
+            //   EquipmentMark: other.EquipmentMark,
+            //   DataRuleContent: DataRuleContent3
+            // }
+            // updateParams.data.Content[0].EquipmentMark = other.EquipmentMark
+            break
+          case '需拆分处理':
+            let SplitPoints = t.other.devArr.length ? t.other.devArr : undefined
+            let DataRuleContent4 = undefined
+            var enum5 = null
+            if (t.other.tranfVal) {
+              enum5 = { seq: 2, ruletype: 'type2', content: t.other.pointArr }
+            } else {
+              enum5 = { seq: 2, ruletype: 'type2', content: [] }
+            }
+            SplitPoints.forEach(ele => {
+              let cutStr = {
+                seq: 1,
+                ruletype: 'type4',
+                content: [
+                  {
+                    from: ele.SplitStart,
+                    to: ele.SplitEnd
+                  }
+                ]
+              }
+              ele.DataRuleContent = JSON.stringify([cutStr, enum5])
+            })
+            eachData.SplitPoints = SplitPoints;
+            // otherParams = {
+            // SplitPoints: SplitPoints
+            // }
+            updateParams.data.Content[0].EquipmentMark = t.other.eqMark
+            break
+        }
+        return eachData;
+      })
       updatePoint(updateParams, res => { this.create(params) })
     },
     create(params) {
@@ -367,7 +424,7 @@ export default {
     },
     handleItemChange(val, cb) {
       if (val.length == 3) {
-        if(val[2]!='null'){
+        if (val[2] != 'null') {
           let params = { type: val[2] }
           getQueryProperty(params, res => {
             if (res.Result == 'success') {
@@ -435,46 +492,77 @@ export default {
     },
     init() {
       //获取所有的设备
-      this.getEqAll()
+      // this.getEqAll()
     },
     //回显数值
     async showValue(val) {
       // await this.getEqAll()
       let length = val.RelationList.length
       let eqMark = this.editData.Point.EquipmentMark
+      this.form.EquipmentMark = eqMark;
       if (length) {
         var data = val.RelationList[0]
         let dict = [data.SpecialtyCode, data.SystemCode, data.EquipmentTypeCode]
-        //回显字典
-        let tempArr = []
-        if (data.TypeCode == 'Eq' || data.TypeCode == 'Ec' || data.TypeCode == 'Sp') {
-          tempArr = [data.TypeCode, data.EquipmentTypeCode, data.InfomationPointCode]
-        } else if (data.TypeCode == 'Sy') {
-          tempArr = [data.TypeCode, data.SpecialtyCode, data.SystemCode, data.InfomationPointCode]
-        } else {
-          tempArr = [data.TypeCode, data.InfomationPointCode]
-        }
+        //回显字典--并保存信息点->relationid map
+        this.pointToRelationID = {}
+        let tempArr = val.RelationList.map(t => {
+          let eachData = [];
+          if (t.TypeCode == 'Eq' || t.TypeCode == 'Ec' || t.TypeCode == 'Sp') {
+            eachData = [t.TypeCode, t.EquipmentTypeCode, t.InfomationPointCode]
+            if (this.pointToRelationID[`${t.TypeCode}-${t.EquipmentTypeCode}-${t.InfomationPointCode}`]) {
+              return undefined
+            }
+            this.pointToRelationID[`${t.TypeCode}-${t.EquipmentTypeCode}-${t.InfomationPointCode}`] = t.Id
+          } else if (t.TypeCode == 'Sy') {
+            eachData = [t.TypeCode, t.SpecialtyCode, t.SystemCode, t.InfomationPointCode]
+            if (this.pointToRelationID[`${t.TypeCode}-${t.SpecialtyCode}-${t.SystemCode}-${t.InfomationPointCode}`]) {
+              return undefined
+            }
+            this.pointToRelationID[`${t.TypeCode}-${t.SpecialtyCode}-${t.SystemCode}-${t.InfomationPointCode}`] = t.Id
+          } else {
+            eachData = [t.TypeCode, t.InfomationPointCode]
+            if (this.pointToRelationID[`${t.TypeCode}-${t.InfomationPointCode}`]) {
+              return undefined
+            }
+            this.pointToRelationID[`${t.TypeCode}-${t.InfomationPointCode}`] = t.Id
+          }
+          return eachData;
+        }).filter(item => item)
         this.$nextTick(() => {
-          this.$refs.dictionaryCas.setCascaderVal(tempArr)
+          this.$refs.dictionaryCas.setCascaderVal(tempArr);
         })
-
-          this.form.DataRuleType = data.DataRuleType
+        let typeTempList = []
+        this.typeList = val.RelationList.map(t => {
+          if (t.TypeCode == 'Eq' || t.TypeCode == 'Ec' || t.TypeCode == 'Sp') {
+            t.name = `${t.Type}-${t.EquipmentType}-${t.InfomationPoint}`
+          } else if (t.TypeCode == 'Sy') {
+            t.name = `${t.Type}-${t.Specialty}-${t.System}-${t.InfomationPoint}`
+          } else {
+            t.name = `${t.Type}-${t.InfomationPoint}`
+          }
+          if (typeTempList.indexOf(t.name) > -1) {
+            return undefined
+          }
+          typeTempList.push(t.name)
+          return t;
+        }).filter(item => item);
+        this.form.DataRuleType = data.DataRuleType
         // this.handleItemChange(dict, () => {
-          // this.unitObj = this.infoDict[data.InfomationPointCode]
-          // this.InfomationPoint = this.unitObj.infoPointName || '--'
-          // if (typeof this.unitObj.dataSource == 'string') {
-          //   if (this.unitObj.dataSource.length) {
-          //     this.ValueDescription = this.unitObj.dataSource
-          //   } else {
-          //     this.ValueDescription = '无信息点单位及值说明'
-          //   }
-          // } else {
-          //   let str = ''
-          //   this.unitObj.dataSource.forEach(ele => {
-          //     str += ele.code + '.' + ele.name + ' '
-          //   })
-          //   this.ValueDescription = str
-          // }
+        // this.unitObj = this.infoDict[data.InfomationPointCode]
+        // this.InfomationPoint = this.unitObj.infoPointName || '--'
+        // if (typeof this.unitObj.dataSource == 'string') {
+        //   if (this.unitObj.dataSource.length) {
+        //     this.ValueDescription = this.unitObj.dataSource
+        //   } else {
+        //     this.ValueDescription = '无信息点单位及值说明'
+        //   }
+        // } else {
+        //   let str = ''
+        //   this.unitObj.dataSource.forEach(ele => {
+        //     str += ele.code + '.' + ele.name + ' '
+        //   })
+        //   this.ValueDescription = str
+        // }
         // })
         if (length == 1) {
           let flag = data.DataRuleType
@@ -583,13 +671,50 @@ export default {
       return str
     },
     //对应数据字典变化
-    changeDictionaryCas({ val, labels }) {
+    changeDictionaryCas({ val, labels, data }) {
       this.dictionaryData = val;
-      this.dictionaryNames = labels
-      this.infoDict = this.$refs.dictionaryCas.pointDataSource
-      this.unitObj = this.infoDict[val[val.length - 1]]
-      this.InfomationPoint = this.unitObj.InfoPointName || ''
-      this.ValueDescription = this.delDataSource(this.unitObj.DataSource)
+      this.dictionaryNames = labels || '';
+      this.unitObj = data || {}
+      if (this.typeList.length) {
+        this.typeList = this.typeList.map(t => {
+          if (labels.indexOf(t.name) < 0) {
+            return undefined
+          }
+          return t;
+        }).filter(item => item)
+        let temp = this.typeList.map(t => {
+          return t.name;
+        })
+        for (let i = 0; i < labels.length; i++) {
+          if (temp.indexOf(labels[i]) < 0) {
+            this.typeList.push({
+              name: labels[i],
+              DataRuleType: '无需处理,直接使用'
+            })
+          }
+        }
+      } else {
+        this.typeList = labels.map(t => {
+          return {
+            name: t,
+            DataRuleType: '无需处理,直接使用'
+          }
+        })
+      }
+      this.typeList = this.typeList.map((t, i) => {
+        t.unitObj = {
+          infoPointCode: data[val[i][val[i].length - 1]].InfoPointCode,
+          infoPointName: data[val[i][val[i].length - 1]].InfoPointName,
+          dataSource: data[val[i][val[i].length - 1]].DataSource || '',
+          type: data[val[i][val[i].length - 1]].Type,
+          unit: data[val[i][val[i].length - 1]].Unit
+        }
+        t.ValueDescription = this.delDataSource(data[val[i][val[i].length - 1]].DataSource)
+        return t;
+      })
+      // this.infoDict = this.$refs.dictionaryCas.pointDataSource
+      // this.InfomationPoint = this.unitObj.InfoPointName || ''
+      // this.ValueDescription = this.delDataSource(this.unitObj.DataSource)
     }
   },
   mounted() {
@@ -623,6 +748,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 {
@@ -638,6 +769,7 @@ export default {
         }
         .btm {
           margin-top: 5px;
+          margin-left: 140px;
         }
       }
     }

+ 3 - 3
src/components/config_point/step3_edit/no_handle.vue

@@ -1,8 +1,8 @@
 <template>
     <el-form ref='form' :model='form' :rules='rules' label-width='140px'>
-        <el-form-item v-if='devFlag' label='对象标识' prop="EquipmentMark">
+        <!-- <el-form-item v-if='devFlag' label='对象标识' prop="EquipmentMark">
             <el-input v-model='form.EquipmentMark'></el-input>
-        </el-form-item>
+        </el-form-item> -->
     </el-form>
 </template>
 
@@ -15,7 +15,7 @@ export default {
                 EquipmentMark: ''
             },
             rules: {
-                EquipmentMark: [{ required: true, message: '请输入对象标识', trigger: 'blur' }],
+                // EquipmentMark: [{ required: true, message: '请输入对象标识', trigger: 'blur' }],
             }
         }
     },

+ 2 - 0
src/components/config_point/step3_edit/split_handle.vue

@@ -189,6 +189,8 @@ export default {
             position: absolute;
             top: -35px;
             left: 23px;
+            margin: 0;
+            padding: 0;
         }
         .right {
             position: absolute;

+ 305 - 249
src/components/config_point/step3_point/3_temps.vue

@@ -11,45 +11,53 @@
           <dictionary-cas @change="changeDictionaryCas" ref="dictionaryCas"></dictionary-cas>
         </el-form-item>
       </el-form>
-      <div class="flex-around">
-        <div class="point-despoint">
-          <p class="center">原始点位说明</p>
-          <p class="p10">{{pointDes}}</p>
-        </div>
-        <div class="point-despoint">
-          <p class="center">数据字典值说明</p>
-          <p class="content-view p10">{{delDataSource(unitObj.DataSource)}}</p>
+      <div>
+        <div v-for="(it,ind) in typeList" :key="ind">
+          <p style="margin:10px 0;">信息点名称: {{it.name}}</p>
+          <div class="flex-around">
+            <div class="point-despoint">
+              <p class="center">原始点位说明</p>
+              <p class="p10">{{pointDes}}</p>
+            </div>
+            <div class="point-despoint">
+              <p class="center">数据字典值说明</p>
+              <p class="content-view p10">{{delDataSource(it.unitObj.DataSource)}}</p>
+            </div>
+          </div>
         </div>
       </div>
-      <div class="center">
+      <div class="center" style="margin-top:20px;">
         <el-button @click="next">下一步</el-button>
       </div>
     </div>
     <div class="collapse-item" v-if="activeName == 1">
-      <div class="flex-around">
-        <div class="point-despoint">
-          <p class="center">原始点位说明</p>
-          <p class="p10">{{pointDes}}</p>
-        </div>
-        <div class="point-despoint">
-          <p class="center">数据字典值说明</p>
-          <p class="content-view p10">{{delDataSource(unitObj.DataSource)}}</p>
+      <div v-for="(it,ind) in typeList" :key="ind">
+        <p style="margin:10px 0;">信息点名称: {{it.name}}</p>
+        <div class="flex-around">
+          <div class="point-despoint">
+            <p class="center">原始点位说明</p>
+            <p class="p10">{{pointDes}}</p>
+          </div>
+          <div class="point-despoint">
+            <p class="center">数据字典值说明</p>
+            <p class="content-view p10">{{delDataSource(it.unitObj.DataSource)}}</p>
+          </div>
         </div>
+        <el-form class="form" :rules="rules" ref="form2" :model="form2" label-width="140px">
+          <el-form-item label='值处理方式' prop='DataRuleType'>
+            <el-select v-model='it.DataRuleType' placeholder='请选择'>
+              <el-option v-for='item in handleTypeArr' :key='item.value' :label='item.label' :value='item.value'></el-option>
+            </el-select>
+          </el-form-item>
+          <!-- components -->
+          <div :ref='"noHandle"+ind' v-if='it.DataRuleType == "无需处理,直接使用"'></div>
+          <auto-handle :devFlag="false" :ref='"autoHandle"+ind' v-else-if='it.DataRuleType == "需自动单位转换"' :unitObj='it.unitObj'></auto-handle>
+          <enum-handle :devFlag="false" :ref='"enumHandle"+ind' v-else-if='it.DataRuleType == "需按设置枚举转换"'></enum-handle>
+          <formula-handle :devFlag="false" :ref='"formulaHandle"+ind' v-else-if='it.DataRuleType == "需按公式转换"'></formula-handle>
+          <!-- <split-handle :devFlag="false" ref='splitHandle' v-else-if='form2.DataRuleType == "需按拆分枚举转换"'></split-handle> -->
+        </el-form>
       </div>
-      <el-form class="form" :rules="rules" ref="form2" :model="form2" label-width="140px">
-        <el-form-item label='值处理方式' prop='DataRuleType'>
-          <el-select v-model='form2.DataRuleType' placeholder='请选择'>
-            <el-option v-for='item in handleTypeArr' :key='item.value' :label='item.label' :value='item.value'></el-option>
-          </el-select>
-        </el-form-item>
-        <!-- components -->
-        <div ref='noHandle' v-if='form2.DataRuleType == "无需处理,直接使用"'></div>
-        <auto-handle :devFlag="false" ref='autoHandle' v-else-if='form2.DataRuleType == "需自动单位转换"' :unitObj='unitObj'></auto-handle>
-        <enum-handle :devFlag="false" ref='enumHandle' v-else-if='form2.DataRuleType == "需按设置枚举转换"'></enum-handle>
-        <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 +72,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>
@@ -151,7 +159,7 @@ export default {
         //     value: '需按拆分枚举转换'
         // }
       ],
-      dealType: {}, //处理方式
+      dealType: [], //处理方式
       form2: {
         ValueDescription: '',
         DataRuleType: '无需处理,直接使用'
@@ -164,7 +172,8 @@ export default {
         }],
         dict: [{ required: true }]
       },
-      pointDes: ""
+      pointDes: "",
+      typeList: []
     }
   },
   created() { },
@@ -185,7 +194,7 @@ export default {
     getMain(param, pagechange) {
       if (!pagechange) {
         this.activeName = 0
-        this.dealType = {}
+        this.dealType = []
         this.form1 = {
           dict: 1
         }
@@ -236,14 +245,19 @@ export default {
       // } else {
       //   this.createParam(params)
       // }
-      let pa = Object.assign({
-        DataSourceId: this.queryParam.DataSourceId,
-        KeyEquipmentParameter: this.queryParam.EquipmentParameter,
-        KeyEquipmentType: this.queryParam.EquipmentType,
-      }, this.dealType);
+      let pa = []
+      this.dealType.forEach((t, i) => {
+        pa.push(Object.assign({
+          DataSourceId: this.queryParam.DataSourceId,
+          KeyEquipmentParameter: this.queryParam.EquipmentParameter,
+          KeyEquipmentType: this.queryParam.EquipmentType,
+        }, t));
+      })
       groupCreatePointRelation(pa, res => {
+        // if (i == this.dealType.length - 1) {
         this.$message.success("处理成功")
         this.$emit("changed")
+        // }
       })
     },
     confirm(assage, params) {
@@ -291,221 +305,235 @@ export default {
           }
         })
       } else if (this.activeName == 1) {
-        this.$refs.form2.validate(valid => {
-          if (valid) {
-            var flag = this.form2.DataRuleType
-            var isNext = true;
-            switch (flag) {
-              case '无需处理,直接使用':
-                this.saveForm(this.form2, {})
-                break
-              case '需自动单位转换':
-                this.$refs.autoHandle.getForm(autoHandle => {
-                  if (autoHandle) {
-                    this.saveForm(this.form2, autoHandle)
-                  } else {
-                    isNext = false
-                    this.errMsg()
-                  }
-                })
-                break
-              case '需按设置枚举转换':
-                this.$refs.enumHandle.getForm(enumHandle => {
-                  if (enumHandle) {
-                    this.saveForm(this.form2, enumHandle)
-                  } else {
-                    isNext = false
-                    this.errMsg()
-                  }
-                })
-                break
-              case '需按公式转换':
-                this.$refs.formulaHandle.getForm(formulaHandle => {
-                  if (formulaHandle) {
-                    this.saveForm(this.form2, formulaHandle)
-                  } else {
-                    isNext = false
-                    this.errMsg()
-                  }
-                })
-                break
-              // case '需按拆分枚举转换':
-              //     this.$refs.splitHandle.getForm(splitHandle => {
-              //         if (splitHandle) {
-              //             this.saveForm(this.form2, splitHandle)
-              //         } else {
-              //             isNext = false
-              //             this.errMsg()
-              //         }
-              //     })
-              //     break
-            }
-            if (isNext) {
-              this.activeName += 1
-              let setting = {
-                data: this.renderData,
-                maxRows: 1000,
-                colHeaders: ['对象标识', '原始点位描述', '位置标签', '备注'],
-                columns: [{
-                  data: 'EquipmentMark'
-                },
-                {
-                  data: 'Description',
-                  readOnly: true
-                },
-                {
-                  data: 'LocationFlag',
-                  readOnly: true
-                },
-                {
-                  data: 'Remarks',
-                  readOnly: true
+        let isNext = true;
+        for (let i = 0; i < this.typeList.length; i++) {
+          let flag = this.typeList[i].DataRuleType
+          let compon = '';
+          switch (flag) {
+            case '无需处理,直接使用':
+              this.typeList[i].other = {}
+              // this.saveForm(this.form2, {})
+              break
+            case '需自动单位转换':
+              compon = `autoHandle${i}`
+              this.$refs[compon][0].getForm(autoHandle => {
+                if (autoHandle) {
+                  this.typeList[i].other = autoHandle;
+                  // this.saveForm(this.form2, autoHandle)
+                } else {
+                  isNext = false
+                  this.errMsg()
                 }
-                ]
-              }
-              if (this.renderData.length) {
-                this.$nextTick(_ => {
-                  this.hot = this.$refs.handsontable.init(setting)
-                })
-              }
+              })
+              break
+            case '需按设置枚举转换':
+              compon = `enumHandle${i}`
+              this.$refs[compon][0].getForm(enumHandle => {
+                if (enumHandle) {
+                  this.typeList[i].other = enumHandle;
+                  // this.saveForm(this.form2, enumHandle)
+                } else {
+                  isNext = false
+                  this.errMsg()
+                }
+              })
+              break
+            case '需按公式转换':
+              compon = `formulaHandle${i}`
+              this.$refs[compon][0].getForm(formulaHandle => {
+                if (formulaHandle) {
+                  this.typeList[i].other = formulaHandle;
+                  // this.saveForm(this.form2, formulaHandle)
+                } else {
+                  isNext = false
+                  this.errMsg()
+                }
+              })
+              break
+            // case '需按拆分枚举转换':
+            //     this.$refs.splitHandle.getForm(splitHandle => {
+            //         if (splitHandle) {
+            //             this.saveForm(this.form2, splitHandle)
+            //         } else {
+            //             isNext = false
+            //             this.errMsg()
+            //         }
+            //     })
+            //     break
+          }
+        }
+        if (isNext) {
+          this.saveForm();
+          this.activeName += 1
+          let setting = {
+            data: this.renderData,
+            maxRows: 1000,
+            colHeaders: ['对象标识', '原始点位描述', '位置标签', '备注'],
+            columns: [{
+              data: 'EquipmentMark'
+            },
+            {
+              data: 'Description',
+              readOnly: true
+            },
+            {
+              data: 'LocationFlag',
+              readOnly: true
+            },
+            {
+              data: 'Remarks',
+              readOnly: true
             }
-
-          } else {
-            this.errMsg()
-            return false
+            ]
           }
-        })
+          if (this.renderData.length) {
+            this.$nextTick(_ => {
+              this.hot = this.$refs.handsontable.init(setting)
+            })
+          }
+        }
       }
     },
-    saveForm(basic, other) {
-      let type = basic.DataRuleType
-      let basicParams = {
-        InfomationPointCode: this.dictionaryData[this.dictionaryData.length - 1], //信息点code
-        InfomationPoint: this.dictionaryNames[this.dictionaryNames.length - 1], //信息点名称
-        DataRuleType: basic.DataRuleType, //值处理方式
-        Type: this.dictionaryNames[0], //一级分类名称
-        TypeCode: this.dictionaryData[0], //一级分类code
-      }
-      if (this.dictionaryData.length == 3) {
-        //设备-部件-空间
-        basicParams.EquipmentTypeCode = this.dictionaryData[1]
-        basicParams.EquipmentType = this.dictionaryNames[1]
-      } else if (this.dictionaryData.length == 4) { //专业系统
-        basicParams.SpecialtyCode = this.dictionaryData[1]
-        basicParams.Specialty = this.dictionaryNames[1]
-        basicParams.SystemCode = this.dictionaryData[2]
-        basicParams.System = this.dictionaryNames[2]
-        basicParams.EquipmentTypeCode = basicParams.SystemCode //为了配置从动参取值存储
-        basicParams.EquipmentType = basicParams.System
-      }
-      let otherParams = {}
-      switch (type) {
-        case '无需处理,直接使用':
-          otherParams = {
-            // EquipmentMark: other.EquipmentMark
-          }
-          break
-        case '需自动单位转换':
-          let DataRuleContent1 = JSON.stringify([{
-            seq: 1,
-            ruletype: 'type1',
-            content: [{
-              from: other.unit[0] + '-' + other.unit[1],
-              to: this.unitObj.unit
-            }]
-          }])
-          otherParams = {
-            DataRuleContent: DataRuleContent1,
+    saveForm() {
+      let params = this.typeList.map((t, i) => {
+        let temp = this.dictionaryData[i],
+          tempNames = t.name.split('-');
+        let eachData = {
+          InfomationPointCode: temp[temp.length - 1],
+          InfomationPoint: tempNames[tempNames.length - 1],
+          DataRuleType: t.DataRuleType,
+          // DataSourceId: this.datasourceId, //数据源id
+          // PointId: this.editData.Point.Id, //点位ID
+          TypeCode: temp[0],
+          Type: tempNames[0],
+          // EquipmentMark: this.form.EquipmentMark
+        }
+        if (temp.length == 3) {
+          //设备-部件-空间
+          eachData.EquipmentTypeCode = temp[1]
+          eachData.EquipmentType = tempNames[1]
+        } else if (temp.length == 4) {
+          eachData.SpecialtyCode = temp[1]
+          eachData.Specialty = tempNames[1]
+          eachData.SystemCode = temp[2]
+          eachData.System = tempNames[2]
+          eachData.EquipmentTypeCode = eachData.SystemCode  //为了配置从动参取值存储
+          eachData.EquipmentType = eachData.System
+        }
+        let type = t.DataRuleType;
+        switch (type) {
+          case '无需处理,直接使用':
+            // otherParams = {
             // EquipmentMark: other.EquipmentMark
-          }
-          break
-        case '需按设置枚举转换':
-          let DataRuleContent2 = other.pointArr.length ?
-            JSON.stringify([{
+            // }
+            break
+          case '需自动单位转换':
+            let DataRuleContent1 = JSON.stringify([{
               seq: 1,
-              ruletype: 'type2',
-              content: other.pointArr
-            }]) :
-            undefined
-          otherParams = {
-            // EquipmentMark: other.EquipmentMark,
-            DataRuleContent: DataRuleContent2
-          }
-          break
-        case '需按公式转换':
-          let subRule = other.from ? {
-            seq: 1,
-            ruletype: 'type4',
-            content: [{
-              from: other.from,
-              to: other.to
-            }]
-          } :
-            undefined
-          let extractRule = {
-            seq: 2,
-            ruletype: 'type5',
-            content: other.extract ? [{
-              extract: 'number'
-            }] : []
-          }
-          let countRule = other.mark ? {
-            seq: 3,
-            ruletype: 'type6',
-            content: [{
-              calculationtype: other.mark,
-              value: other.markValue
-            }]
-          } :
-            undefined
-          let DataRuleContent3 = []
-          if (subRule) {
-            DataRuleContent3.push(subRule)
-          }
-          DataRuleContent3.push(extractRule)
-          if (countRule) {
-            DataRuleContent3.push(countRule)
-          }
-          DataRuleContent3 = DataRuleContent3.length ? JSON.stringify(DataRuleContent3) : undefined
-          otherParams = {
+              ruletype: 'type1',
+              content: [{
+                from: t.other.unit[0] + '-' + t.other.unit[1],
+                to: this.unitObj.unit
+              }]
+            }])
+            eachData.DataRuleContent = DataRuleContent1;
+            // otherParams = {
+            // DataRuleContent: DataRuleContent1,
+            // EquipmentMark: other.EquipmentMark
+            // }
+            break
+          case '需按设置枚举转换':
+            let DataRuleContent2 = t.other.pointArr.length ?
+              JSON.stringify([{
+                seq: 1,
+                ruletype: 'type2',
+                content: t.other.pointArr
+              }]) :
+              undefined
+            eachData.DataRuleContent = DataRuleContent2;
+            // otherParams = {
             // EquipmentMark: other.EquipmentMark,
-            DataRuleContent: DataRuleContent3
-          }
-          break
-        case '需拆分处理':
-          let SplitPoints = other.devArr.length ? other.devArr : undefined
-          let DataRuleContent4 = undefined
-          var enum5 = null
-          if (other.tranfVal) {
-            enum5 = {
-              seq: 2,
-              ruletype: 'type2',
-              content: other.pointArr
-            }
-          } else {
-            enum5 = {
-              seq: 2,
-              ruletype: 'type2',
-              content: []
-            }
-          }
-          SplitPoints.forEach(ele => {
-            let cutStr = {
+            // DataRuleContent: DataRuleContent2
+            // }
+            break
+          case '需按公式转换':
+            let subRule = t.other.from ? {
               seq: 1,
               ruletype: 'type4',
               content: [{
-                from: ele.SplitStart,
-                to: ele.SplitEnd
+                from: t.other.from,
+                to: t.other.to
               }]
+            } :
+              undefined
+            let extractRule = {
+              seq: 2,
+              ruletype: 'type5',
+              content: t.other.extract ? [{
+                extract: 'number'
+              }] : []
             }
-            ele.DataRuleContent = JSON.stringify([cutStr, enum5])
-          })
-          otherParams = {
-            SplitPoints: SplitPoints
-          }
-          break
-      }
-      this.dealType = Object.assign(basicParams, otherParams)
+            let countRule = t.other.mark ? {
+              seq: 3,
+              ruletype: 'type6',
+              content: [{
+                calculationtype: t.other.mark,
+                value: t.other.markValue
+              }]
+            } :
+              undefined
+            let DataRuleContent3 = []
+            if (subRule) {
+              DataRuleContent3.push(subRule)
+            }
+            DataRuleContent3.push(extractRule)
+            if (countRule) {
+              DataRuleContent3.push(countRule)
+            }
+            DataRuleContent3 = DataRuleContent3.length ? JSON.stringify(DataRuleContent3) : undefined
+            eachData.DataRuleContent = DataRuleContent3;
+            // otherParams = {
+            // EquipmentMark: other.EquipmentMark,
+            // DataRuleContent: DataRuleContent3
+            // }
+            break
+          case '需拆分处理':
+            let SplitPoints = t.other.devArr.length ? t.other.devArr : undefined
+            let DataRuleContent4 = undefined
+            var enum5 = null
+            if (t.other.tranfVal) {
+              enum5 = {
+                seq: 2,
+                ruletype: 'type2',
+                content: t.other.pointArr
+              }
+            } else {
+              enum5 = {
+                seq: 2,
+                ruletype: 'type2',
+                content: []
+              }
+            }
+            SplitPoints.forEach(ele => {
+              let cutStr = {
+                seq: 1,
+                ruletype: 'type4',
+                content: [{
+                  from: ele.SplitStart,
+                  to: ele.SplitEnd
+                }]
+              }
+              ele.DataRuleContent = JSON.stringify([cutStr, enum5])
+            })
+            eachData.SplitPoints = SplitPoints;
+            // otherParams = {
+            //   SplitPoints: SplitPoints
+            // }
+            break
+        }
+        return eachData;
+      })
+      this.dealType = params
       // this.create(params)
     },
     validateDict(rule, value, cb) {
@@ -599,12 +627,40 @@ export default {
       return str
     },
     //对应数据字典变化
-    changeDictionaryCas({ val, labels }) {
+    changeDictionaryCas({ val, labels, data }) {
       this.dictionaryData = val;
-      this.dictionaryNames = labels
-      this.infoDict = this.$refs.dictionaryCas.pointDataSource
-      this.unitObj = this.infoDict[val[val.length - 1]]
-      this.InfomationPoint = this.unitObj.InfoPointName || ''
+      this.dictionaryNames = labels;
+      this.unitObj = data
+      if (this.typeList.length) {
+        this.typeList = this.typeList.map(t => {
+          if (labels.indexOf(t.name) < 0) {
+            return undefined
+          }
+          return t;
+        }).filter(item => item)
+        let temp = this.typeList.map(t => {
+          return t.name;
+        })
+        for (let i = 0; i < labels.length; i++) {
+          if (temp.indexOf(labels[i]) < 0) {
+            this.typeList.push({
+              name: labels[i],
+              DataRuleType: '无需处理,直接使用'
+            })
+          }
+        }
+      } else {
+        this.typeList = labels.map(t => {
+          return {
+            name: t,
+            DataRuleType: '无需处理,直接使用'
+          }
+        })
+      }
+      this.typeList = this.typeList.map((t, i) => {
+        t.unitObj = data[val[i][val[i].length - 1]];
+        return t;
+      })
     },
     //分页发生更改
     changePage() {
@@ -686,7 +742,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 +757,7 @@ export default {
     }
   }
   .collapse-item {
-    height: 290px;
+    height: 328px;
     overflow-y: auto;
   }
 }

+ 1 - 0
src/components/config_point/step3_point/steps3_main.vue

@@ -145,6 +145,7 @@
                                     // KeyEquipmentParameter: '温度',
                                     // KeyEquipmentType: '冷机'
                                 },
+                                Orders: 'EquipmentMark asc',
                                 PageNumber: this.pages.currentPage,
                                 PageSize: this.pages.size
                             },

+ 79 - 23
src/components/data_admin/buildTask/detail/assetsDetail.vue

@@ -6,12 +6,14 @@
           <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.SchemeId?detail.SchemeId == 1 ? '极简' : '标准':'--' }}
+          </el-form-item>
           <el-form-item label="设备族:">{{ detail.EquipFamily?detail.EquipFamily.FamilyName?detail.EquipFamily.FamilyName:'--':'--' }}</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.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>
@@ -34,8 +36,8 @@
               <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`" 
+                 @click="nowUrl = item.Key"
+                 :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.Key}&width=400`"
                  :preview-src-list="srcList">
                 </el-image>
               </div>
@@ -43,34 +45,39 @@
           </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">
+              <source :src="`/image-service/common/file_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">
+      <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 timestamp="2018/4/12" placement="top">
-                <el-card>
-                  <h4>更新 Github 模板</h4>
-                  <p>王小虎 提交于 2018/4/12 20:46</p>
-                </el-card>
-              </el-timeline-item>
-              <el-timeline-item timestamp="2018/4/3" placement="top">
-                <el-card>
-                  <h4>更新 Github 模板</h4>
-                  <p>王小虎 提交于 2018/4/3 20:46</p>
-                </el-card>
-              </el-timeline-item>
-              <el-timeline-item timestamp="2018/4/2" placement="top">
+              <el-timeline-item
+                  placement="top"
+                  v-for="(item,index) in arr"
+                  :key="index"
+                  :timestamp="item.timestamp"
+              >
                 <el-card>
-                  <h4>更新 Github 模板</h4>
-                  <p>王小虎 提交于 2018/4/2 20:46</p>
+                  <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/file_get?systemId=dataPlatform&key=${v.Key}`"
+                        type="video/mp4">
+                    您的浏览器不支持 HTML5 video ,暂无法播放。
+                  </video>
                 </el-card>
               </el-timeline-item>
             </el-timeline>
@@ -91,6 +98,53 @@ 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"]),
     panoramaList(){
@@ -138,10 +192,12 @@ export default {
   data() {
     return {
       dialogVisible: false,//全景图弹出框
-      nowUrl: ''//当前正在显示的图
+      nowUrl: '',//当前正在显示的图
+      arr: [],
     };
   },
   methods: {
+
   },
   watch: {
     'detail.TaskId'() {
@@ -181,4 +237,4 @@ export default {
     cursor: pointer;
   }
 }
-</style>
+</style>

+ 233 - 134
src/components/data_admin/buildTask/detail/deviceDetail.vue

@@ -6,87 +6,98 @@
           <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.SchemeId?detail.SchemeId == 1 ? '极简' : '标准':'--' }}
+          </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.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>
+            {{Name ? Name :'-'}}{{Count ? ':' + Count +'个' :'-'}}
           </el-form-item>
         </el-form>
       </div>
-      <div class="implement-detail detail-item" v-if="detail.TaskState == '未找到'">
+      <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-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 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">
-              <img :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.Key}`" style="width:100%;" :alt="item.Name">
+            <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">
+          <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">
+                          :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">
+            <video controls style="width:100%;" v-for="item in videoList" :key="item.Key"
+                   :title="item.Name">
+              <source :src="`/image-service/common/file_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">
+      <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 timestamp="2018/4/12" placement="top">
-                <el-card>
-                  <h4>更新 Github 模板</h4>
-                  <p>王小虎 提交于 2018/4/12 20:46</p>
-                </el-card>
-              </el-timeline-item>
-              <el-timeline-item timestamp="2018/4/3" placement="top">
-                <el-card>
-                  <h4>更新 Github 模板</h4>
-                  <p>王小虎 提交于 2018/4/3 20:46</p>
-                </el-card>
-              </el-timeline-item>
-              <el-timeline-item timestamp="2018/4/2" placement="top">
+              <el-timeline-item
+                  placement="top"
+                  v-for="(item,index) in arr"
+                  :key="index"
+                  :timestamp="item.timestamp"
+              >
                 <el-card>
-                  <h4>更新 Github 模板</h4>
-                  <p>王小虎 提交于 2018/4/2 20:46</p>
+                  <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/file_get?systemId=dataPlatform&key=${v.Key}`"
+                        type="video/mp4">
+                    您的浏览器不支持 HTML5 video ,暂无法播放。
+                  </video>
                 </el-card>
               </el-timeline-item>
             </el-timeline>
@@ -101,119 +112,207 @@
 </template>
 
 <script>
-import { } from "@/api/scan/request"
-import { mapGetters } from "vuex"
-export default {
-  components: {
+  import {mapGetters} from "vuex"
+  import {categoryCount, modelCategoryCount} from "@/api/data_admin/buildTaskApi"
 
-  },
-  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 {//部件全部找到
+  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
-          return this.detail.TaskPicList?this.detail.TaskPicList:[]
+          if (this.detail && this.detail.TaskPicList && this.detail.TaskPicList.length) {
+            return this.detail.TaskPicList
+          } else {
+            return []
+          }
         }
-      } else {
-        this.detail.isComponent = false
-        if(this.detail && this.detail.TaskPicList && this.detail.TaskPicList.length){
-          return this.detail.TaskPicList
+      },
+      panoramaList() {
+        if (this.notFoundList && this.notFoundList.length) {
+          return this.notFoundList.filter(item => {
+            return item.Type == 'panorama'
+          })
         } else {
           return []
         }
-      }
-    },
-    panoramaList(){
-      if(this.notFoundList && this.notFoundList.length){
-        return this.notFoundList.filter(item => {
-          return item.Type == 'panorama'
+      },
+      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
         })
-      } else {
-        return []
+        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;
       }
     },
-    imgList(){
-      if(this.notFoundList && this.notFoundList.length){
-        return this.notFoundList.filter(item => {
-          return item.Type == 'image'
-        })
-      } else {
-        return []
-      }
+    props: {
+      detail: Object,
+      type: String
     },
-    videoList(){
-      if(this.notFoundList && this.notFoundList.length){
-        return this.notFoundList.filter(item => {
-          return item.Type == 'video'
+    data() {
+      return {
+        dialogVisible: false,//全景图弹出框
+        nowUrl: '',//当前正在显示的图
+        arr: [],
+        Name: '',
+        Count: '', //包含部件
+      };
+    },
+    methods: {
+      //  查询设备部件数量
+      handleContent(row) {
+        let param = {
+          TaskId: row.TaskId,
+          EquipId: row.EquipId
+        }
+        this.Name = ''
+        this.Count = ''
+        categoryCount(param, res => {
+          if (res.Content.length) {
+            this.Name = res.Content[0].Name
+            this.Count = res.Content[0].Count
+          }
+
+        })
+      },
+      //  查询模型部件数量
+      handleModelContent(row) {
+        let param = {
+          TaskId: row.TaskId,
+          EquipId: row.EquipId
+        }
+        this.Name = ''
+        this.Count = ''
+        modelCategoryCount(param, res => {
+          if (res.Content.length) {
+            this.Name = res.Content[0].Name
+            this.Count = res.Content[0].Count
+          }
+
         })
-      } 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: '',//当前正在显示的图
-    };
-  },
-  methods: {
-  },
-  watch: {
-    'detail.TaskId'() {
-      console.log(this.detail)
+    watch: {
+      'detail.TaskId'() {
+        console.log(this.detail)
+      }
     }
-  }
-};
+  };
 </script>
 <style lang="less" scoped>
-.detail-box {
-  width: 100%;
-  height: 100%;
-  box-sizing: border-box;
-  /deep/ .el-scrollbar__wrap {
-    overflow-x: hidden;
-  }
-  /deep/ .el-icon-circle-close {
-    color: white;
-  }
+  .detail-box {
+    width: 100%;
+    height: 100%;
+    box-sizing: border-box;
 
-  /deep/ .el-form-item__content {
-    text-overflow: ellipsis;
-    overflow: hidden;
-  }
+    /deep/ .el-scrollbar__wrap {
+      overflow-x: 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);
-  }
+    /deep/ .el-icon-circle-close {
+      color: white;
+    }
+
+    /deep/ .el-form-item__content {
+      text-overflow: ellipsis;
+      overflow: hidden;
+    }
 
-  .img-item {
-    position: relative;
-    cursor: pointer;
+    .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;
+    }
   }
-}
-</style>
+</style>

+ 3 - 3
src/components/data_admin/buildTask/dialog/addTaskDialog.vue

@@ -1,7 +1,7 @@
 <template>
   <el-dialog :title="title" :visible.sync="addTaskDialog" :before-close="handleClose" width="500px">
-    <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="110px">
-      <el-form-item label="未验证任务" prop="isVerification">
+    <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="140px">
+      <el-form-item label="只选择未验证过的" prop="isVerification">
         <el-switch v-model="ruleForm.isVerification"></el-switch>
       </el-form-item>
       <el-form-item label="任务类型" prop="taskType">
@@ -94,4 +94,4 @@ export default {
 };
 </script>
 <style lang="less" scoped>
-</style>
+</style>

+ 73 - 35
src/components/data_admin/buildTask/dialog/modelTaskDialog.vue

@@ -20,7 +20,7 @@
         <el-table-column prop="EquipLocalName" label="设备本地名称" show-overflow-tooltip width="100"></el-table-column>
         <el-table-column prop="EquipLocalID" label="设备本地编码" show-overflow-tooltip width="100"></el-table-column>
         <el-table-column prop="EquipCategory.EquipName" label="设备类" show-overflow-tooltip width="120"></el-table-column>
-        <el-table-column prop="BimId" label="BIM Id" show-overflow-tooltip width="80"></el-table-column>
+        <el-table-column prop="BIMID" label="BIM Id" show-overflow-tooltip width="80"></el-table-column>
         <el-table-column prop="type" label="现场验证操作规定" width="150">
           <template slot-scope="scope">
             <el-select style="width:100px;" v-model="scope.row.SchemeId" placeholder="请选择">
@@ -48,27 +48,30 @@
 </template>
 
 <script>
-import { queryEquip } from "@/api/scan/request"
-import { createModelTask, queryModelDiglog } from "@/api/data_admin/buildTaskApi"
-import { mapGetters } from "vuex"
-export default {
-  components: {
-  },
-  computed: {
-    ...mapGetters("layout", ["projectId"])
-  },
-  data() {
-    return {
-      title: "确认创建任务",
-      options: [{//方案
-        value: '1',
-        label: '标准'
-      }],
-      tableData: [],
-      loading: false,
-      selections: [], // 选中项
-      page: {
-        pageSize: 50,
+  import {queryEquip} from "@/api/scan/request"
+  import {createModelTask, queryModelDiglog} from "@/api/data_admin/buildTaskApi"
+  import {mapGetters} from "vuex"
+
+  export default {
+    components: {},
+    computed: {
+      ...mapGetters("layout", ["projectId"])
+    },
+    data() {
+      return {
+        title: "确认创建任务",
+        options: [{//方案
+          value: '1',
+          label: '极简'
+        }, {
+          value: '2',
+          label: '标准'
+        }],
+        tableData: [],
+        loading: false,
+        selections: [], // 选中项
+        page: {
+          pageSize: 50,
         pageSizes: [10, 20, 50, 100],
         pageNumber: 1,
         total: 0
@@ -90,6 +93,8 @@ export default {
   },
   methods: {
     getTableData() {
+      this.loading = true
+
       let params = {
         Cascade: [
           {
@@ -116,22 +121,43 @@ export default {
       }
 
       if (this.params.isVerification) {
-        params.Filters += `;TaskState isNull`
+        // params.Filters += `;(TaskState isNull || TaskState=0 || TaskState=-1)`
+        // params.Filters += `;(TaskState!=0 || TaskState!=-1 || TaskState!=1)`
+        params.Filters += `;TaskState isnull`
+      } else {
+        // params.Filters += `;(TaskState!=1)`
+        params.Filters += `;(TaskState isnull or TaskState !=1 )`
       }
 
       if (this.params.device) {
-        params.Filters += `;Category='${this.params.category}'`
+        params.Filters += `;Category='${this.params.device}'`
       }
 
       if (this.params.spaceList && this.params.spaceList.length) {
-        //通过平面图区域查询(接口未支持)paramsQuery:{listId:[]}
-        params.IdList = this.params.spaceList
-        queryModelDiglog(params, res => {
+        //通过平面图区域查询
+        // console.log(this.params,'this.params')
+        let arr = []
+        this.params.spaceList.forEach(i => {
+          let list = `${this.projectId}${this.params.modelFolderId}${this.params.modelFileName}:${i}`
+          arr.push(list)
+        })
+        let param = {
+          ModelId: this.params.CurrentModelId,
+          IdList: arr,
+          Category:this.params.device || '',
+         // Filters : `Category='${this.params.device || ''}'`,
+          PageNumber: this.page.pageNumber,
+          PageSize: this.page.pageSize
+        }
+        // console.log(param,'param')
+        queryModelDiglog(param, res => {
+          this.loading = false
           this.dataFormatter(res)
         })
       } else {
         params.Filters += `;ModelId='${this.params.CurrentModelId}'`
         queryEquip(params, res => {
+          this.loading = false
           this.dataFormatter(res)
         })
       }
@@ -161,7 +187,8 @@ export default {
         item.FolderId = this.params.modelFolderId
         item.FileName = this.params.modelFileName
         item.FileId = this.params.CurrentModelId
-        item.SchemeId = "1"
+        // 后端定义默认值(前端取消默认值设定)
+        // item.SchemeId = "1"
         return item
       })
       this.page.total = res.Total
@@ -173,12 +200,23 @@ export default {
     savaRelation() {
       if (this.selections.length) {
         let list = this.selections.map((item) => {
-          return {
-            EquipId: item.EquipID,
-            FileId: item.FileId,
-            FileName: item.FileName,
-            FolderId: item.FolderId,
-            FolderName: item.FolderName
+          if (item.SchemeId) {
+            return {
+              EquipId: item.EquipID,
+              FileId: item.FileId,
+              FileName: item.FileName,
+              FolderId: item.FolderId,
+              FolderName: item.FolderName,
+              SchemeId: item.SchemeId
+            }
+          } else {
+            return {
+              EquipId: item.EquipID,
+              FileId: item.FileId,
+              FileName: item.FileName,
+              FolderId: item.FolderId,
+              FolderName: item.FolderName
+            }
           }
         })
         let params = {
@@ -250,4 +288,4 @@ export default {
   margin-left: 120px;
   width: 100%;
 }
-</style>
+</style>

+ 79 - 21
src/components/data_admin/buildTask/draw/drawModel.vue

@@ -2,16 +2,17 @@
   <div :id="`drawFloor${id}`" class="drawFloor" v-loading="canvasLoading">
     <canvas :id="`floorCanvas${id}`" :width="cadWidth" :height="cadHeight" ref="canvas" tabindex="0"></canvas>
     <div class="operate" v-show="showTools">
-      <canvasFun @fit="fit" @savePng="savePng" @saveSvg="saveSvg" @scale="scale" :config="config" ref="canvasFun"></canvasFun>
+      <canvasFun @fit="fit" @savePng="savePng" @saveSvg="saveSvg" @scale="scale" @saveJson="saveJson" :config="config" ref="canvasFun"></canvasFun>
     </div>
   </div>
 </template>
 
 <script>
 import { DivideFloorScene, FloorView } from "@saga-web/cad-engine/lib"
-// import { SColor, SPoint } from "@sybotan-web/draw/lib";
+import { SColor, SPoint } from "@saga-web/draw/lib";
 import canvasFun from "@/components/business_space/newGraphy/canvasFun"
-import { floorQuery } from "@/api/scan/request";
+import { queryEquip } from "@/api/scan/request";
+import { mapGetters } from "vuex";
 export default {
   components: {
     canvasFun
@@ -27,6 +28,7 @@ export default {
       modelId: '',
       FloorID: '',
       Outline: [],
+      deviceList: [],
       buttonContent: "",
       showTools: false,
       config: {
@@ -44,7 +46,21 @@ export default {
     dialog: {
       default: false
     },
-    CurrentModelId: String
+    isLight:{
+      type: Boolean,
+      default: false
+    },
+    CurrentModelId: String,
+    modelName: String, //模型文件夹和模型文件名称
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId","projects"]),
+    projectName() {
+      let projectObj = this.projects.find(item => {
+        return item.id == this.projectId
+      })
+      return projectObj?projectObj.name?projectObj.name:projectObj.id:this.projectId
+    }
   },
   created() { },
   mounted() {
@@ -58,21 +74,10 @@ export default {
       this.drawMainScene = new DivideFloorScene();
       this.canvasLoading = true;
       this.drawMainScene.getFloorData('/modelapi/base-graph/query', { ModelId: ModelId }).then(res => {
-        console.log(this)
+        // console.log(this)
         this.getGraphtSuc(res);
       })
     },
-    getFloorData() {
-      let pa = {
-        Filters: `FloorID='${this.FloorID}'`
-      }
-      floorQuery(pa, res => {
-        let newArr = res.Content[0].Outline.map(t => {
-          return new SPoint(t.X, t.Y);
-        })
-        this.drawMainScene.addSceneMark(newArr)
-      })
-    },
     getSelectedSpaces() {//获取选中区域
       if (this.view && this.view.scene) {
         let list = this.view.scene.getSelectedSpaces();
@@ -106,15 +111,52 @@ export default {
         return;
       }
       this.view.scene = this.drawMainScene;
+      if(this.isLight){//高亮显示未验证的区块
+        this.deviceList = []
+        this.highLightPoint()
+      }
       this.view.fitSceneToView();
       this.drawMainScene.click(this, this.canvasClick);
-
       if (this.$refs.canvasFun) {
-        this.view.maxScale = this.view.scale * 10;
         this.view.minScale = this.view.scale;
         this.$refs.canvasFun.everyScale = this.view.scale;
       }
     },
+    //高亮未完成验证的区块
+    async highLightPoint() {
+      await this.getUnverificationDevice()
+      this.view.scene.spaceList.forEach(item => {
+        for(let deviceItem of this.deviceList) {
+          if(deviceItem.LocationJson && item.contains(deviceItem.LocationJson.X, -deviceItem.LocationJson.Y)){//注:坐标体系不同,Y坐标取反
+            item.highLightFlag = true
+            break
+          }
+        }
+      })
+    },
+    //获取模型下未验证的设备
+    getUnverificationDevice(pageNum) {
+      return new Promise((resolve) => {
+        pageNum = pageNum ? pageNum : 1
+        let params = {
+          Filters: `TaskState isNull;ModelId='${this.CurrentModelId}'`,
+          Orders: "CreateTime desc, EquipID asc",
+          Projection: ["EquipID", "BIMID", "BIMLocation", "LocationJson"],
+          PageNumber: pageNum,
+          PageSize: 1000
+        }
+        queryEquip(params, res => {
+          this.deviceList = res.Content
+          resolve();
+        });
+      });
+      // queryEquip(params, res => {
+      //   this.deviceList = this.deviceList.concat(res.Content)
+      //   if (res.Total / (res.PageSize * res.PageNumber) > 1) {
+      //     this.getUnverificationDevice(res.PageNumber + 1)
+      //   } else { }
+      // });
+    },
     // canvas 获取焦点
     focus() {
       document.getElementById(`floorCanvas${this.id}`).focus()
@@ -126,11 +168,14 @@ export default {
     },
     // 保存为png
     savePng() {
-      this.view.saveImage(`${this.floor}.png`, 'png');
+      this.view.saveImage(`${this.projectName}-${this.modelName}.png`, 'png');
     },
     // 保存为svg
     saveSvg() {
-      this.view.saveSceneSvg(`${this.floor}.svg`, 6400, 4800);
+      this.view.saveSceneSvg(`${this.projectName}-${this.modelName}.svg`, 6400, 4800);
+    },
+    saveJson() {
+      this.view.saveFloorJson(`${this.projectName}-${this.modelName}.json`)
     },
     // 缩放
     scale(val) {
@@ -142,6 +187,18 @@ export default {
     }
   },
   watch: {
+    isLight: {
+      handler(newValue, oldValue) {
+        if(newValue){//高亮显示未验证的区块
+          this.deviceList = []
+          this.highLightPoint()
+        } else {
+          this.view.scene.spaceList.forEach(item => {
+            item.highLightFlag = false
+          })
+        }
+      }
+    },
     CurrentModelId: {
       handler(newName, oldName) {
         if (newName) {
@@ -153,7 +210,8 @@ export default {
     "view.scale": {
       handler(n) {
         if (this.$refs.canvasFun) {
-          this.$refs.canvasFun.sliderVal = n * 10 / this.view.minScale;
+          let s = n * 10 / this.view.minScale
+          this.$refs.canvasFun.sliderVal = s > 1000 ? 1000 : s;
         }
       }
     },

+ 14 - 9
src/components/data_admin/buildTask/table/assetsTable.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="table-container">
     <div class="table-list" :style="tableData && tableData.length?'height:calc(100% - 50px);':'height:100%;'">
-      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="headerStyle">
+      <el-table :data="tableData" style="width: 100%;" height="100%" v-loading="loading" :header-cell-style="headerStyle">
         <el-table-column label="所属建筑楼层" show-overflow-tooltip min-width="100">
           <template slot-scope="scope">
             <div>
@@ -10,8 +10,8 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column prop="EquipLocalID" :label="`${inSpaceType}本地名称`" show-overflow-tooltip min-width="100"></el-table-column>
-        <el-table-column prop="EquipLocalName" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="EquipLocalName" :label="`${inSpaceType}本地名称`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="EquipLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
         <el-table-column prop="EquipFamily.FamilyName" label="设备族" show-overflow-tooltip min-width="100"></el-table-column>
         <el-table-column prop="InstallLocation" label="安装位置" show-overflow-tooltip min-width="100"></el-table-column>
         <el-table-column prop="TaskState" label="任务执行情况" show-overflow-tooltip min-width="100"></el-table-column>
@@ -50,7 +50,7 @@ export default {
     assetsDetail
   },
   computed: {
-    ...mapGetters("layout", ["projectId"])
+    ...mapGetters("layout", ["projectId", "userInfo"])
   },
   props: {
     paramsData: Object,
@@ -83,6 +83,7 @@ export default {
   methods: {
     // 获取列表数据
     getTableData() {
+      this.loading = true
       let params = {
         Filters: `ProjectId='${this.projectId}'`,
         Cascade: [
@@ -117,6 +118,7 @@ export default {
         params.Filters += `;Category='${this.paramsData.family}'`
       }
       queryAssetsTask(params, res => {
+        this.loading = false
         this.page.total = res.Total;
         this.tableData = res.Content.map(item => {
           item.TaskState = this.taskStateMap[item.TaskState]
@@ -145,6 +147,7 @@ export default {
       let params = {
         Content: [{
           EquipId: row.EquipId,
+          SchemeId:row.SchemeId,
           TaskState: -1
         }]
       }
@@ -157,6 +160,8 @@ export default {
     handleConfirm(index, row){
       let params = {
         Content: [{
+          ConfirmingPersonId: this.userInfo.userId,
+          ConfirmingPersonName: this.userInfo.userName,
           TaskId: row.TaskId,
           TaskState: 0
         }]
@@ -181,10 +186,6 @@ export default {
     handleCurrentChange(pageNo) {
       this.page.pageNumber = pageNo;
       this.getTableData()
-    },
-    projectId() {
-      this.page.pageNumber = 1
-      this.getTableData()
     }
   },
   watch: {
@@ -197,6 +198,10 @@ export default {
       },
       immediate: true,
       deep: true
+    },
+    projectId() {
+      this.page.pageNumber = 1
+      this.getTableData()
     }
   }
 };
@@ -217,4 +222,4 @@ export default {
     margin-right: 15px;
   }
 }
-</style>
+</style>

+ 40 - 22
src/components/data_admin/buildTask/table/deviceTable.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="table-container">
     <div class="table-list" :style="tableData && tableData.length?'height:calc(100% - 50px);':'height:100%;'">
-      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="headerStyle">
+      <el-table :data="tableData" style="width: 100%;" height="100%" v-loading="loading" :header-cell-style="headerStyle" >
         <el-table-column label="所属建筑楼层" show-overflow-tooltip min-width="100">
           <template slot-scope="scope">
             <div>
@@ -14,8 +14,9 @@
           <template slot-scope="scope">
             <div>
               {{scope.row.EquipLocalName}}
-              <el-badge v-if="scope.row.Equipment?scope.row.Equipment.Component?scope.row.Equipment.Component.length:false:false" 
-                :value="scope.row.Equipment?scope.row.Equipment.Component?scope.row.Equipment.Component.length:0:0" class="item" type="warning">
+              <el-badge v-if="scope.row.Component&&scope.row.Component.length?true:false"
+                        :value="scope.row.Component&&scope.row.Component.length?scope.row.Component.length:0"
+                        class="item" type="warning">
               </el-badge>
             </div>
           </template>
@@ -44,27 +45,28 @@
      :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="page.total">
     </el-pagination>
     <el-drawer title="任务详情" :visible.sync="drawer" direction="rtl" size="600px">
-      <device-detail :detail="detailDevice"></device-detail>
+      <device-detail :detail="detailDevice" ref="deviceDetail"></device-detail>
     </el-drawer>
   </div>
 </template>
 
 <script>
-import { queryDeviceTask, deleteDeviceTask, createDeviceTask, updateDeviceTask } from "@/api/data_admin/buildTaskApi"
-import tools from "@/utils/tools"
-import { mapGetters } from "vuex"
-import deviceDetail from '../detail/deviceDetail'
-export default {
-  components: {
-    deviceDetail
-  },
-  computed: {
-    ...mapGetters("layout", ["projectId"])
-  },
-  props: {
-    paramsData: Object,
-  },
-  data() {
+  import {createDeviceTask, deleteDeviceTask, queryDeviceTask, updateDeviceTask} from "@/api/data_admin/buildTaskApi"
+  import tools from "@/utils/tools"
+  import {mapGetters} from "vuex"
+  import deviceDetail from '../detail/deviceDetail'
+
+  export default {
+    components: {
+      deviceDetail
+    },
+    computed: {
+      ...mapGetters("layout", ["projectId", "userInfo"])
+    },
+    props: {
+      paramsData: Object,
+    },
+    data() {
     return {
       inSpaceType: '设备',
       loading: false, // loading
@@ -92,6 +94,7 @@ export default {
   methods: {
     // 获取列表数据
     getTableData() {
+      this.loading = true
       let params = {
         Filters: `ProjectId='${this.projectId}'`,
         Cascade: [
@@ -128,6 +131,7 @@ export default {
         params.Filters += `;Category='${this.paramsData.deviceCategory}'`
       }
       queryDeviceTask(params, res => {
+        this.loading = false
         this.page.total = res.Total;
         this.tableData = res.Content.map(item => {
           if(item.Component && item.Component.length){
@@ -173,18 +177,23 @@ export default {
       let params = {
         Content: [{
           EquipId: row.EquipId,
-          TaskState: -1
+          TaskState: -1,
+          SchemeId:row.SchemeId
         }]
       }
       createDeviceTask(params, res => {
         this.$message.success('重新生成任务成功!')
         this.getTableData()
+        this.$emit('upData')
+
       })
     },
     //认可此任务执行情况
     handleConfirm(index, row){
       let params = {
         Content: [{
+          ConfirmingPersonId: this.userInfo.userId,
+          ConfirmingPersonName: this.userInfo.userName,
           TaskId: row.TaskId,
           TaskState: 0
         }]
@@ -192,12 +201,18 @@ export default {
       updateDeviceTask(params, res => {
         this.$message.success('更新成功!')
         this.getTableData()
+        this.$emit('upData')
       })
     },
     //查看任务详情
     handleDetail(index, row) {
       this.drawer = true
-      this.detailDevice = row
+      this.$nextTick(() => {
+        this.detailDevice = row
+        this.$refs.deviceDetail.handleContent(row)
+      })
+
+
     },
     // 改变pagesize
     handleSizeChange(pageSize) {
@@ -237,6 +252,9 @@ export default {
 /deep/ .el-drawer__header {
   margin-bottom: 12px;
 }
+/deep/ .el-badge__content{
+  width: 20px;
+}
 .table-container {
   height: 100%;
   background: #fff;
@@ -245,4 +263,4 @@ export default {
     margin-right: 15px;
   }
 }
-</style>
+</style>

+ 34 - 21
src/components/data_admin/buildTask/table/modelTable.vue

@@ -1,15 +1,16 @@
 <template>
   <div class="table-container">
     <div class="table-list" :style="tableData && tableData.length?'height:calc(100% - 50px);':'height:100%;'">
-      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="headerStyle">
+      <el-table :data="tableData" style="width: 100%;" height="100%" v-loading="loading" :header-cell-style="headerStyle">
         <el-table-column prop="FolderName" label="所属模型文件夹" show-overflow-tooltip min-width="80"></el-table-column>
         <el-table-column prop="FileName" label="模型文件名" show-overflow-tooltip min-width="80"></el-table-column>
         <el-table-column :label="`${inSpaceType}本地名称`" show-overflow-tooltip min-width="100">
           <template slot-scope="scope">
             <div>
               {{scope.row.EquipLocalName}}
-              <el-badge v-if="scope.row.Equipment?scope.row.Equipment.Component?scope.row.Equipment.Component.length:false:false" 
-                :value="scope.row.Equipment?scope.row.Equipment.Component?scope.row.Equipment.Component.length:0:0" class="item" type="warning">
+              <el-badge v-if="scope.row.Component&&scope.row.Component.length?true:false"
+                        :value="scope.row.Component&&scope.row.Component.length?scope.row.Component.length:0"
+                        class="item" type="warning">
               </el-badge>
             </div>
           </template>
@@ -38,27 +39,28 @@
      :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="page.total">
     </el-pagination>
     <el-drawer title="任务详情" :visible.sync="drawer" direction="rtl" size="600px">
-      <device-detail :detail="detailModel"></device-detail>
+      <device-detail :detail="detailModel" ref="detailModel"></device-detail>
     </el-drawer>
   </div>
 </template>
 
 <script>
-import { queryModelTask, deleteModelTask, updateModelTask, createModelTask } from "@/api/data_admin/buildTaskApi"
-import tools from "@/utils/tools"
-import { mapGetters } from "vuex"
-import deviceDetail from '../detail/deviceDetail'
-export default {
-  components: {
-    deviceDetail
-  },
-  computed: {
-    ...mapGetters("layout", ["projectId"])
-  },
-  props: {
-    paramsData: Object,
-  },
-  data() {
+  import {createModelTask, deleteModelTask, queryModelTask, updateModelTask} from "@/api/data_admin/buildTaskApi"
+  import tools from "@/utils/tools"
+  import {mapGetters} from "vuex"
+  import deviceDetail from '../detail/deviceDetail'
+
+  export default {
+    components: {
+      deviceDetail
+    },
+    computed: {
+      ...mapGetters("layout", ["projectId", "userInfo"])
+    },
+    props: {
+      paramsData: Object,
+    },
+    data() {
     return {
       inSpaceType: '设备',
       loading: false, // loading
@@ -89,6 +91,7 @@ export default {
   methods: {
     // 获取列表数据
     getTableData() {
+      this.loading = true
       let params = {
         Filters: `ProjectId='${this.projectId}'`,
         Cascade: [
@@ -114,6 +117,7 @@ export default {
         params.Filters += `;Category='${this.paramsData.modelCategory}'`
       }
       queryModelTask(params, res => {
+        this.loading = false
         this.page.total = res.Total;
         this.tableData = res.Content.map(item => {
           if(item.Component && item.Component.length){
@@ -163,6 +167,7 @@ export default {
           FileName: row.FileName,
           FolderId: row.FolderId,
           FolderName: row.FolderName,
+          SchemeId: row.SchemeId,
           TaskState: -1
         }]
       }
@@ -175,6 +180,8 @@ export default {
     handleConfirm(index, row){
       let params = {
         Content: [{
+          ConfirmingPersonId: this.userInfo.userId,
+          ConfirmingPersonName: this.userInfo.userName,
           TaskId: row.TaskId,
           TaskState: 0
         }]
@@ -187,7 +194,10 @@ export default {
     //查看任务详情
     handleDetail(index, row) {
       this.drawer = true
-      this.detailModel = row
+      this.$nextTick(() => {
+        this.detailModel = row
+        this.$refs.detailModel.handleModelContent(row)
+      })
     },
     // 改变pagesize
     handleSizeChange(pageSize) {
@@ -227,6 +237,9 @@ export default {
 /deep/ .el-drawer__header {
   margin-bottom: 12px;
 }
+/deep/ .el-badge__content{
+  width: 20px;
+}
 .table-container {
   height: 100%;
   background: #fff;
@@ -235,4 +248,4 @@ export default {
     margin-right: 15px;
   }
 }
-</style>
+</style>

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

@@ -1,7 +1,7 @@
 <template>
   <div class="table-container">
     <div class="table-list" :style="tableData && tableData.length?'height:calc(100% - 50px);':'height:100%;'">
-      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="headerStyle">
+      <el-table :data="tableData" style="width: 100%;" height="100%" v-loading="loading" :header-cell-style="headerStyle">
         <el-table-column label="所属建筑楼层" show-overflow-tooltip min-width="100">
           <template slot-scope="scope">
             <div>
@@ -92,6 +92,7 @@ export default {
   methods: {
     // 获取列表数据
     getTableData() {
+      this.loading = true
       let params = {
         Filters: `ProjectId='${this.projectId}';TaskType in ['2']`,
         Cascade: [
@@ -124,6 +125,7 @@ export default {
       //   params.Filters += `;Family='${this.paramsData.family}'`
       // }
       queryAssetsTask(params, res => {
+        this.loading = false
         this.page.total = res.Total;
         this.tableData = res.Content.map(item => {
           item.TaskState = this.taskStateMap[item.TaskState]

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

@@ -1,7 +1,7 @@
 <template>
   <div class="table-container">
     <div class="table-list" :style="tableData && tableData.length?'height:calc(100% - 50px);':'height:100%;'">
-      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="headerStyle">
+      <el-table :data="tableData" style="width: 100%;" height="100%" v-loading="loading" :header-cell-style="headerStyle">
         <el-table-column label="所属建筑楼层" show-overflow-tooltip min-width="100">
           <template slot-scope="scope">
             <div>
@@ -92,6 +92,7 @@ export default {
   methods: {
     // 获取列表数据
     getTableData() {
+      this.loading = true
       let params = {
         Filters: `ProjectId='${this.projectId}';TaskType in ['3','-5']`,
         Cascade: [
@@ -124,6 +125,7 @@ export default {
       //   params.Filters += `;Family='${this.paramsData.family}'`
       // }
       queryAssetsTask(params, res => {
+        this.loading = false
         this.page.total = res.Total;
         this.tableData = res.Content.map(item => {
           item.TaskState = this.taskStateMap[item.TaskState]

+ 17 - 15
src/components/data_admin/buildTask/taskStatistics.vue

@@ -3,7 +3,7 @@
 		<div class="statistics-all flex-row">
       <div class="statistics-progress">
         <div class="statistics-progress-num">
-          <p>{{taskProgress?taskProgress:0 + '%'}}</p>
+          <p>{{taskProgress?taskProgress + '%':0 + '%'}}</p>
           <p>完成情况</p>
         </div>
         <el-progress :width="90" type="circle" :percentage="taskProgress?taskProgress:0" :show-text="false"></el-progress>
@@ -35,19 +35,18 @@
 </template>
 
 <script>
-import { mapGetters } from "vuex"
-import { queryTaskCount, countAssetsTask } from "@/api/data_admin/buildTaskApi"
-export default {
-  components: {
-    
-  },
-  computed: {
-    ...mapGetters("layout", ["projectId", "secret", "userId" ]),
-    taskProgress(){
-      if(typeof this.alreadyCount == 'number' && typeof this.allCount == 'number'){
-        return Math.round(this.alreadyCount/this.allCount*100)
+  import {mapGetters} from "vuex"
+  import {countAssetsTask, queryTaskCount} from "@/api/data_admin/buildTaskApi"
+
+  export default {
+    components: {},
+    computed: {
+      ...mapGetters("layout", ["projectId", "secret", "userId"]),
+      taskProgress() {
+        if (typeof this.alreadyCount == 'number' && typeof this.allCount == 'number') {
+          return Math.round(this.alreadyCount / this.allCount * 100)
+        }
       }
-    }
   },
   data() {
     return {
@@ -82,6 +81,9 @@ export default {
       countAssetsTask({Filters: `TaskState=1&&TaskType='2'`},(res) => {
         this.waitReplaceCount = res.Count
       })
+    },
+    upDataList() {
+      this.getTaskCount()
     }
   },
   watch: {
@@ -124,7 +126,7 @@ export default {
           flex: 1;
           font-size: 15px;
           line-height: 35px;
-        } 
+        }
       }
     }
     .statistics-list{
@@ -157,4 +159,4 @@ export default {
     display: flex;
 		flex-direction: column;
   }
-</style>
+</style>

+ 137 - 0
src/components/data_admin/zoneInput.vue

@@ -0,0 +1,137 @@
+<template>
+  <div id="zoneinput">
+    <el-form label-position="left" :label-width="labelWidth" :model="form">
+      <div v-for="(titem, tkey) in inputTypeList" :key="tkey">
+        <h4>{{ tkey }}</h4>
+        <el-form-item v-for="(item, key) in titem" :key="key" :label="item.InfoPointName" class="input-item">
+          <el-input v-model="item.inputValue" v-if="item.InputMode == 'A1'|| item.InputMode == 'A2'" type="number">
+            <template slot="append" v-if="item.Unit">{{item.Unit}}</template>
+          </el-input>
+          <el-input v-model="item.inputValue" v-else-if="item.InputMode == 'B1' || item.InputMode == 'L' || item.InputMode == 'M'"></el-input>
+          <el-select v-model="item.inputValue" v-else-if="item.InputMode == 'D1'" placeholder="请选择">
+            <el-option v-for="(soption,skey) in item.options" :key="skey" :label="soption.Name" :value="soption.Code">
+            </el-option>
+          </el-select>
+          <el-cascader v-model="item.inputValue" v-else-if="item.InputMode == 'D1L'" placeholder="请在台账中维护该类型信息点"
+            :props="item.props" :options="item.options" filterable clearable disabled :show-all-levels="false"></el-cascader>
+          <el-input v-model="item.inputValue" v-else></el-input>
+        </el-form-item>
+      </div>
+    </el-form>
+  </div>
+</template>
+
+<script>
+import tools from "@/utils/scan/tools";
+export default {
+  data() {
+    return {
+      form: {},
+      inputTypeList: {},//输入框表头种类
+      inputData: [],//所有输入框
+    }
+  },
+  props: {
+    labelWidth: {
+      default: "130px",
+      type: String
+    }
+  },
+  created() {
+  },
+  methods: {
+    //初始化
+    init(val) {
+      this.inputTypeList = {};
+      this.inputData = [];
+      this.inputData = val.concat()
+      this.filterInput();
+      this.inputGroup();
+    },
+    //数据过滤
+    filterInput() {
+      this.inputData = this.inputData.filter(item => {
+        return item.Editable == true && item.Visible == true && item.FirstName && item.InfoPointCode;
+      })
+      let numbersInput = ['A1', 'A2'];
+      let stringInput = ['B1', 'L', 'M'];
+      let arrayInput = ['D1'];
+      let cascaderInput = ['D1L'];
+      this.inputData.map(item => {
+        if (numbersInput.indexOf(item.InputMode) != -1) {
+          item.inputValue = null;
+        }
+        else if (stringInput.indexOf(item.InputMode) != -1) {
+          item.inputValue = '';
+        }
+        else if (arrayInput.indexOf(item.InputMode) != -1) {
+          let options = JSON.parse(item.DataSource)
+          item.inputValue = '';
+          item.options = options;
+        }
+        else if(cascaderInput.indexOf(item.InputMode) != -1){
+          let options = JSON.parse(item.DataSource);
+          if (options[0] && options[0].Content) {
+            item.props = {
+              value: 'Code',
+              label: 'Name',
+              children: 'Content',
+              checkStrictly: true
+            }
+          }
+          item.options = options;
+          item.inputValue = [];
+        }
+        else {
+          item.inputValue = '';
+        }
+      });
+
+    },
+    //数据分组
+    inputGroup() {
+      this.inputData.map(item => {
+        if (!this.inputTypeList[item.FirstName]) {
+          this.inputTypeList[item.FirstName] = [];
+        }
+        this.inputTypeList[item.FirstName].push(item)
+      })
+      for (let key in this.inputTypeList) {
+        if (this.inputTypeList[key] instanceof Array) {
+          this.inputTypeList[key].sort((item1, item2) => { return item1.Sort < item2.Sort });
+        }
+      }
+    },
+    //父组件获取form
+    getFormData() {
+      let f = {}
+      for (let key in this.inputTypeList) {
+        this.inputTypeList[key].map(item => {
+          if (item.inputValue != '' && item.inputValue != null) {
+            if (item.inputValue instanceof Array) {
+              tools.setDataForKey(f, item.Path, item.inputValue.pop());
+            }
+            else {
+              tools.setDataForKey(f, item.Path, item.inputValue);
+            }
+          }
+        })
+      }
+      return f;
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.input-item {
+  display: inline-block;
+  position: relative;
+  margin-right: 10px;
+}
+#zoneinput {
+  /deep/ .el-form-item__content {
+    width: 220px;
+  }
+}
+</style>

+ 1 - 1
src/components/dialogHanson/addDevice.vue

@@ -344,7 +344,7 @@ export default {
           "filter_by_value",
           "filter_action_bar"
         ],
-        contextMenu: {
+        contextMenu: this.onlyRead ? false :{
           items: {
             remove_row: {
               name: "删除该业务空间"

+ 0 - 0
src/components/dialogs/addDialog/businessDialog.vue


Some files were not shown because too many files changed in this diff