232 Commits a7e2fbb3ba ... c1d66ab75e

Author SHA1 Message Date
  haojianlong c1d66ab75e 修改问题 3 years ago
  zhangyu f4e8d4f0f6 Merge branch 'dataType' of git.sagacloud.cn:web/adm into dataType 3 years ago
  zhangyu 0f9e02daef 添加占位符 3 years ago
  onlyh f21d1dffc2 Merge remote-tracking branch 'origin/dataType' into dataType 3 years ago
  onlyh 741dba425f adm:feat> 修改关系相关需求与bug 3 years ago
  zhangyu 8b50a89122 处理系统图信息点为图片类型 3 years ago
  zhangyu 0a9c455de1 添加美凯龙项目与 3 years ago
  onlyh fb1b7c16b7 adm:feat> 修改項目集团编码 3 years ago
  onlyh 297e978aeb adm:feat> 修改項目集团编码 3 years ago
  zhangyu 9d5417324e 修改集成二测问题 3 years ago
  zhangyu 740c071054 修改二轮集测问题 3 years ago
  zhangyu 8eecdd0382 修改楼层字段 3 years ago
  zhangyu ae9eb97673 需采集信息点进入交互切换 3 years ago
  zhangyu 14a8a69ae0 隐藏项目数据转换 3 years ago
  zhangyu be762d175b Merge branch 'dataType' of git.sagacloud.cn:web/adm into dataType 3 years ago
  zhangyu 7f9cd1b203 修改关系数量 3 years ago
  haojianlong 9ea724251d 修改图svg没有颜色问题 3 years ago
  zhangyu 967fb325b8 Merge branch 'dataType' of git.sagacloud.cn:web/adm into dataType 3 years ago
  zhangyu efa9c57e25 第一轮集中测试问题修改 3 years ago
  onlyh 1df1b7a45e Merge remote-tracking branch 'origin/dataType' into dataType 3 years ago
  zhangyu fff2ffdd6d 深化点表文案修改 3 years ago
  onlyh bb1a3eec55 Merge remote-tracking branch 'origin/dataType' into dataType 3 years ago
  zhangyu 930b8fdc69 修改版本号 3 years ago
  zhangyu 038704f369 添加请求头参数 3 years ago
  zhangyu 2c57674cb2 替换删除建筑楼层接口 3 years ago
  zhangyu acbebe491f 优化关系导入 3 years ago
  zhangyu 5e01082609 修改部件传参 3 years ago
  onlyh d151b431e1 Merge remote-tracking branch 'origin/dataType' into dataType 3 years ago
  onlyh 972f68a248 adm:feat> 关系上传下载魔板 3 years ago
  zhangyu 16165405b4 修改系统台账查询问题 3 years ago
  zhangyu ac0963b378 三轮测试问题修改 3 years ago
  haojianlong faea97e5d6 解决适配时出现的bug 3 years ago
  haojianlong 11c5f0da05 Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  haojianlong f3ef044412 部件传参问题修改 3 years ago
  zhangyu 3586f91175 问题修改 3 years ago
  zhangyu 03cfbb33b6 Merge branch 'dataType' of git.sagacloud.cn:web/adm into dataType 3 years ago
  zhangyu 9b54d60725 扫楼任务无部件信息不展示展开图标 3 years ago
  haojianlong 4c75439412 Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  haojianlong 614aadffeb 指定字段清空 3 years ago
  zhangyu 198c3335ff 消息中心问题修改 3 years ago
  zhangyu 3fff65d5e4 部件信息处理 3 years ago
  zhangyu ece01c4015 bug修改 3 years ago
  zhangyu 9285109b7e Merge branch 'dataType' of git.sagacloud.cn:web/adm into dataType 3 years ago
  zhangyu 81739b0113 二轮提测问题修改 3 years ago
  haojianlong 0595b1c328 修改问题 3 years ago
  zhangyu 3424d876fc Merge branch 'dataType' of git.sagacloud.cn:web/adm into dataType 3 years ago
  zhangyu ef05dbd55e 修改二测bug 3 years ago
  haojianlong 9681a93c16 更新版本 3 years ago
  haojianlong ace00e666a Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  onlyh c5fbfde9c5 Merge remote-tracking branch 'origin/dataType' into dataType 3 years ago
  onlyh b7d019f3e3 adm:feat> 修改关系卡片显示 3 years ago
  zhangyu ca2214a2bc Merge branch 'dataType' of git.sagacloud.cn:web/adm into dataType 3 years ago
  zhangyu f491de364c 添加切换路由取消上个路由未响应的接口,二轮测试bug修改 3 years ago
  haojianlong 649170e3d4 字段问题修改 3 years ago
  haojianlong f626c2c43a 修改业务空间bug 3 years ago
  zhangyu 03929d5ec4 Merge branch 'dataType' of git.sagacloud.cn:web/adm into dataType 3 years ago
  zhangyu eb86396d9a 添加14项目,测试问题修改 3 years ago
  haojianlong 5bf5483c0e Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  haojianlong 96b09cb9d6 防止重复创建 3 years ago
  onlyh 9a595dbad3 adm:feat> 39添加项目 3 years ago
  haojianlong 00a3f35d1f Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  haojianlong 78f72cf1c7 修改bug7487 3 years ago
  zhangyu 641456abfe Merge branch 'dataType' of git.sagacloud.cn:web/adm into dataType 3 years ago
  zhangyu 0016b3d41f 扫楼问题和二轮测试问题修改 3 years ago
  onlyh 5bcce17177 adm:feat> 修改字段 3 years ago
  onlyh b1f7da3b93 wanda-adm:feat> 修改bug #7898 3 years ago
  onlyh 413dd3638b Merge remote-tracking branch 'origin/dataType' into dataType 3 years ago
  onlyh 7f72128ae9 wanda-adm:feat> 修改bug #7868 3 years ago
  zhangyu 25f77e6522 扫楼问题修改 3 years ago
  onlyh d4caef2eba wanda-adm:feat> 修改bug #7879 3 years ago
  onlyh 1b14e70ea5 wanda-adm:feat> 修改bug 7906 3 years ago
  zhangyu 21b85c5595 Merge branch 'dataType' of git.sagacloud.cn:web/adm into dataType 3 years ago
  zhangyu 3e3330db4c 添加数据同步日志 3 years ago
  shaun-sheep b9be295d77 adm:feat> 修改文字 3 years ago
  shaun-sheep de625c4c1a adm:feat> 修改bug 3 years ago
  zhangyu d0fd2729b4 bug修改 3 years ago
  zhangyu a50166023a Merge branch 'dataType' of git.sagacloud.cn:web/adm into dataType 3 years ago
  zhangyu 305c3aa063 提测问题修改 3 years ago
  YaolongHan bc290c29ee debug #7757 3 years ago
  YaolongHan 007366de9c Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  YaolongHan 5eed4446d3 debug #7736 3 years ago
  haojianlong 22c7699e52 Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  haojianlong 7e0f27c520 创建按钮处理 3 years ago
  shaun-sheep 1719643683 Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  shaun-sheep 9007f7a168 adm:feat> 修改bug,æ·39添加项目 3 years ago
  haojianlong 52e4057081 Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  haojianlong bba9267844 修复问题7693 3 years ago
  YaolongHan 8d52d4ac56 debug 7502 3 years ago
  YaolongHan 860e913793 Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  haojianlong 9d21ff3f79 报错修复 3 years ago
  haojianlong 31227d4024 7595 bug修复 3 years ago
  YaolongHan b276ec67bc Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  YaolongHan 8ea690b293 debug #7688 3 years ago
  haojianlong 290f23a9f1 Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  haojianlong 818301a3d9 异常处理 3 years ago
  YaolongHan 1eca67c352 debug #7610 3 years ago
  YaolongHan 21fac62db4 bug 7600 3 years ago
  YaolongHan 711048c860 Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  YaolongHan 85ac5f0036 debug 3 years ago
  zhangyu e1492b3b41 Merge branch 'dataType' of git.sagacloud.cn:web/adm into dataType 3 years ago
  zhangyu ed94eee1e0 提交:20210318 3 years ago
  haojianlong 43099ed2fb Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  haojianlong 5bd6a3803d 修复问题 3 years ago
  YaolongHan ed50a9976f 解决冲突 3 years ago
  YaolongHan bf7916d829 debug 3 years ago
  haojianlong fa04f1c926 Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  haojianlong 7ca26e374a 数据质量相关bug 3 years ago
  zhangyu 7be68d07c0 Merge branch 'dataType' of git.sagacloud.cn:web/adm into dataType 3 years ago
  zhangyu 51f249f12d 修改bug 3 years ago
  shaun-sheep e9a7f1f118 Merge remote-tracking branch 'origin/dataType' into dataType 3 years ago
  shaun-sheep e53b3e1b0a adm:feat> 修改bug,优化项目切换 3 years ago
  haojianlong abaee8c84c Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  haojianlong 046d1173d9 bug 7545 3 years ago
  zhangyu 47951a9aee Merge branch 'dataType' of git.sagacloud.cn:web/adm into dataType 3 years ago
  zhangyu 48bd61baac 显示需采集信息点 3 years ago
  haojianlong a0e913f780 bug 7523 3 years ago
  haojianlong 5eb724ba87 bug 7517 3 years ago
  haojianlong 5fd6d96581 bug 7493 3 years ago
  zhangyu b25b00ca1c 切换环境 3 years ago
  zhangyu 850795b666 Merge branch 'dataType' of git.sagacloud.cn:web/adm into dataType 3 years ago
  zhangyu 1d6e3782d3 添加数据同步日志 3 years ago
  shaun-sheep 5e109f69e3 adm:feat> 39环境添加项目 3 years ago
  zhangyu c4fb0ccf6e 隐藏需采集信息点 3 years ago
  zhangyu 010f4d059c Merge branch 'dataType' of git.sagacloud.cn:web/adm into dataType 3 years ago
  zhangyu 43cfa8ccfa 修改模型日志无设备类型映射时显示设备编码 3 years ago
  haojianlong a2c4582291 Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  haojianlong bc90f76662 修改业务空间切换项目bug 3 years ago
  zhangyu 3eae71bad7 竖井相关问题修改 3 years ago
  zhangyu 03a73c1bec Merge branch 'dataType' of git.sagacloud.cn:web/adm into dataType 3 years ago
  zhangyu 88ecc26995 修改楼层替换模型文件 3 years ago
  haojianlong d1f0a30020 数据质量报告bug修复 3 years ago
  zhangyu 224527a2c3 需采集信息点优化 3 years ago
  zhangyu 0e01560442 bug修改 3 years ago
  zhangyu fff1a951fd 修改bug,添加需采集信息点 3 years ago
  zhangyu f7c9bf1598 修改需采集信息点入口位置 3 years ago
  shaun-sheep 72288522bc Merge remote-tracking branch 'origin/dataType' into dataType 3 years ago
  shaun-sheep 7d3c396351 adm:feat > 项目添加 3 years ago
  zhangyu 455acc02e8 取消关联资产才可维护设备部件的限制 3 years ago
  zhangyu d3e714e1a8 去掉log 3 years ago
  zhangyu d2c3e85eee 隐藏需采集信息点,bug修改 3 years ago
  zhangyu d16e996384 Merge branch 'dataType' of git.sagacloud.cn:web/adm into dataType 3 years ago
  zhangyu a18f4f42bf 修改bug 3 years ago
  zhangyu e580a381d9 修改big 3 years ago
  shaun-sheep 35dce3214b Merge remote-tracking branch 'origin/dataType' into dataType 3 years ago
  shaun-sheep 48f5d99692 adm:feat > 修改楼层,建筑添加 3 years ago
  zhangyu 690f92e0c9 Merge branch 'dataType' of git.sagacloud.cn:web/adm into dataType 3 years ago
  zhangyu 65b5b9e812 bug修改 3 years ago
  haojianlong 7f7e444adf 只读模式位置不可改变 3 years ago
  haojianlong f09a015f07 Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  haojianlong dfcb56653b 修改字段projection 3 years ago
  shaun-sheep 06f3eaadcf Merge remote-tracking branch 'origin/dataType' into dataType 3 years ago
  shaun-sheep 60ba85aa9f adm:feat > 修改字段 3 years ago
  zhangyu 90fa520059 Merge branch 'dataType' of git.sagacloud.cn:web/adm into dataType 3 years ago
  zhangyu b6e5d8881a bug修改 3 years ago
  haojianlong f01955f6d7 业务空间创建时报错问题修改 3 years ago
  haojianlong 8bd4fc59cc Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  haojianlong 16aa6cd166 业务空间轮廓线更新问题 3 years ago
  shaun-sheep d3c1b9f220 Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  shaun-sheep ea116e48f4 adm:feat > 添加深化点表导入,删除单值维护 3 years ago
  haojianlong 8217699438 Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  haojianlong 5f37654bf9 解决bug 3 years ago
  zhangyu 1f97274529 Merge branch 'dataType' of git.sagacloud.cn:web/adm into dataType 3 years ago
  zhangyu 95f0f7886b 修改bug 3 years ago
  shaun-sheep bac161c46f adm:feat > 批量信息维护 3 years ago
  haojianlong 558c330e99 Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  haojianlong 8a8004ec08 修改bug 3 years ago
  zhangyu 6fef1e0b5d 合并冲突 3 years ago
  zhangyu 4ed6b6741e 修改bug 3 years ago
  shaun-sheep 24c7f57f6e adm:feat > 更改配置 3 years ago
  shaun-sheep b1832f2370 Merge remote-tracking branch 'origin/dataType' into dataType 3 years ago
  shaun-sheep 1bb881bc96 adm:feat > 添加集团code 3 years ago
  haojianlong 62b0a578bd 请求玩业务空间适配 3 years ago
  haojianlong 869352cd1f Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  haojianlong 8dcd108c1e 修改创建业务空间时上传的图片未显示数量问题 3 years ago
  haojianlong fb1722f094 修改bug请求错误 3 years ago
  zhangyu 4cfd1008bd bug修改2200221100330055 3 years ago
  haojianlong 9d9bb32f1a 重复创建bug 3 years ago
  haojianlong 7669a2a76e 竖井无法进入;空间计算放开 3 years ago
  haojianlong 2744e1ebb7 Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  haojianlong b62aaab52d 修改bug7532 7531 7527 7509 3 years ago
  shaun-sheep 674901c0a1 Merge remote-tracking branch 'origin/dataType' into dataType 3 years ago
  shaun-sheep de06644c86 adm:feat > 修改bug 3 years ago
  zhangyu 869a4af1f4 Merge branch 'dataType' of git.sagacloud.cn:web/adm into dataType 3 years ago
  zhangyu 274eac271c 修改用户名字段 3 years ago
  haojianlong 5d4230cdfe 修改小写 3 years ago
  shaun-sheep c2832188b8 Merge remote-tracking branch 'origin/dataType' into dataType 3 years ago
  shaun-sheep 8e8e4e7760 adm:feat > 更改image-service 3 years ago
  zhangyu 8c69947c87 修改台账bug 3 years ago
  shaun-sheep 4e4d71edfe adm:feat > 更改为14环境 3 years ago
  shaun-sheep 4be30e87ee adm:feat > 更改为14环境 3 years ago
  shaun-sheep d9a103b75c adm:feat > 完善扫楼功能不全 3 years ago
  shaun-sheep 82f9988168 adm:feat > 关联的业务空间数量展示 3 years ago
  shaun-sheep e3b62a4016 adm:feat > 14全平台测试环境配置 3 years ago
  shaun-sheep 29c55d9a4f adm:feat > 添加版本信息 3 years ago
  shaun-sheep e52f81bb86 adm:feat > 添加项目 万达模型测试项目2 3 years ago
  shaun-sheep c746aca961 adm:feat > 添加项目 3 years ago
  haojianlong 07d62926ae Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  haojianlong 61c6d18846 bug 3 years ago
  shaun-sheep c64875fd1b adm:feat > 修改扫楼接口 3 years ago
  shaun-sheep 26bab7be34 adm:feat > 动态信息错误处理 3 years ago
  haojianlong e9b1972b97 修改null 3 years ago
  shaun-sheep 7ecf35764e adm:feat > 添加项目 3 years ago
  shaun-sheep 8b4df637a7 adm:feat > 修改空间字段 删掉 sort 3 years ago
  shaun-sheep ef544796e4 adm:feat > 修改空间字段 classCode -> zoneType 3 years ago
  shaun-sheep 773b35c016 adm:feat > 修改设备类别获取 3 years ago
  shaun-sheep 8de28fa83b adm:feat > 修改厂商库信息,信息可手动输入 3 years ago
  haojianlong 2083247b66 修改问题绑定平面图 3 years ago
  shaun-sheep 6d119920c3 adm:feat > 添加项目 3 years ago
  haojianlong 35267dec37 修改比例尺字段 3 years ago
  haojianlong 1b7a62b1d5 修改下载名称undefined的问题 3 years ago
  haojianlong 761d3f0f7d 3.8功能bug修改 3 years ago
  haojianlong 4dca5105d5 部件字段修改 3 years ago
  haojianlong d2ee9bbf9e Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  haojianlong 05e9353fc6 inputmode修改 3 years ago
  shaun-sheep ace3c74246 adm:feat > 修改详情页相关inputMode输入类型 3 years ago
  haojianlong 06bb96584c 删除notshow中无用代码 3 years ago
  haojianlong 6ead196dd9 修改inputmode 删除无用 3 years ago
  haojianlong 477cf5d889 Merge branch 'dev' into dataType 3 years ago
  haojianlong 957c67a1f9 修改平面图替换bug 3 years ago
  haojianlong a978dfb193 修改inputmode 3 years ago
  shaun-sheep 7998e381be adm:feat > 修改详情页相关inputMode输入类型,端口号 3 years ago
  haojianlong a12a9c9ba8 台账四大厂商数据存储 3 years ago
  haojianlong b13a35bf4b 表格修改四大厂商 3 years ago
  haojianlong 68a58ad989 删除无用方法 3 years ago
  haojianlong 1c2cb3a2db 设备台账数据类型 3 years ago
  haojianlong 99df4c564b 删除打包文件 3 years ago
  haojianlong 53b7c84a36 Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  haojianlong 6582ddf5c3 设备台账列表展示类型修改 3 years ago
  shaun-sheep 90b0259bc0 adm:feat > 修改添加/修改楼层输入类型 3 years ago
  shaun-sheep 0bf21353e9 Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType 3 years ago
  shaun-sheep 343ac7faa1 - 3 years ago
  shaun-sheep 68c0292c12 adm:feat > 修改添加/修改建筑输入类型 3 years ago
100 changed files with 4000 additions and 7971 deletions
  1. 537 0
      config/conf.js
  2. 5 325
      config/index.js
  3. 5 2
      config/prod.env.js
  4. 6 6
      package.json
  5. 29 1
      src/api/dict/index.js
  6. 5 0
      src/api/httputils.js
  7. 9 2
      src/api/relation/api.js
  8. 3 0
      src/api/scan/config.js
  9. 6 0
      src/api/scan/fetch.js
  10. 13 9
      src/api/scan/httpUtil.js
  11. 45 48
      src/api/scan/request.js
  12. 50 0
      src/api/synclog/index.js
  13. BIN
      src/assets/image/no-data.png
  14. 0 1
      src/assets/js/jsmind.js
  15. 63 47
      src/components/business_space/business/handsontable.vue
  16. 0 770
      src/components/business_space/dialogs/addDialog/businessDialog.vue
  17. 6 26
      src/components/business_space/dialogs/list/insurerDialog.vue
  18. 6 26
      src/components/business_space/dialogs/list/maintainerDialog.vue
  19. 6 26
      src/components/business_space/dialogs/list/supplierDialog.vue
  20. 2 2
      src/components/business_space/lib/uploadFiles.vue
  21. 1 1
      src/components/business_space/newAddDialogs/addEquipDialog.vue
  22. 13 13
      src/components/business_space/newAddDialogs/roomInFloorDialog.vue
  23. 4 1
      src/components/business_space/newGraphy/createBSP.vue
  24. 40 33
      src/components/business_space/newGraphy/graphy.vue
  25. 1 1
      src/components/business_space/newGraphy/unRelateBSP.vue
  26. 224 215
      src/components/data_admin/buildTask/detail/assetsDetail.vue
  27. 273 276
      src/components/data_admin/buildTask/detail/deviceDetail.vue
  28. 10 1
      src/components/data_admin/buildTask/dialog/modelTaskDialog.vue
  29. 18 4
      src/components/data_admin/buildTask/table/assetsTable.vue
  30. 13 7
      src/components/data_admin/buildTask/table/deviceTable.vue
  31. 12 4
      src/components/data_admin/buildTask/table/modelTable.vue
  32. 14 2
      src/components/data_admin/buildTask/table/replaceTable.vue
  33. 14 2
      src/components/data_admin/buildTask/table/tearTable.vue
  34. 51 49
      src/components/data_admin/zoneInput.vue
  35. 0 502
      src/components/dialogHanson/addDevice.vue
  36. 0 770
      src/components/dialogs/addDialog/businessDialog.vue
  37. 0 848
      src/components/dialogs/addDialog/dialogAssets.vue
  38. 5 5
      src/components/dialogs/changeRea.vue
  39. 134 44
      src/components/dialogs/list/batchDialog.vue
  40. 6 0
      src/components/dialogs/list/filesDialog.vue
  41. 6 26
      src/components/dialogs/list/insurerDialog.vue
  42. 6 26
      src/components/dialogs/list/maintainerDialog.vue
  43. 6 26
      src/components/dialogs/list/supplierDialog.vue
  44. 251 239
      src/components/dialogs/list/systemType.vue
  45. 0 872
      src/components/ledger/addDialog/dialogAssets.vue
  46. 20 20
      src/components/ledger/cenote/dialog/addSpaceDialog.vue
  47. 3 3
      src/components/ledger/cenote/dialog/addSystemDialog.vue
  48. 1 1
      src/components/ledger/cenote/elevationMap.vue
  49. 20 26
      src/components/ledger/cenote/relatedSpaceList.vue
  50. 3 3
      src/components/ledger/cenote/table/systemTable.vue
  51. 2 2
      src/components/ledger/details/detail/cruxDialog.vue
  52. 11 30
      src/components/ledger/details/detail/exhibitionBaseInformation.vue
  53. 109 114
      src/components/ledger/details/detail/exhibitionCrux.vue
  54. 24 4
      src/components/ledger/details/detail/exhibitionEnergy.vue
  55. 14 2
      src/components/ledger/details/detail/exhibitionEnergyO.vue
  56. 33 234
      src/components/ledger/handsontables/assets.vue
  57. 125 438
      src/components/ledger/handsontables/device.vue
  58. 67 88
      src/components/ledger/handsontables/system.vue
  59. 0 510
      src/components/ledger/lib/addDevice.vue
  60. 28 8
      src/components/ledger/lib/bimDialog.vue
  61. 1 1
      src/components/ledger/lib/buildfloorCascader.vue
  62. 120 0
      src/components/ledger/lib/buildingDialog.vue
  63. 4 1
      src/components/ledger/lib/cascader.vue
  64. 12 3
      src/components/ledger/lib/cenoteGraphy.vue
  65. 108 0
      src/components/ledger/lib/excelDialog.vue
  66. 3 5
      src/components/ledger/lib/floorCascader.vue
  67. 38 36
      src/components/ledger/lib/linkassets.vue
  68. 3 3
      src/components/ledger/lib/noAllDataFloor.vue
  69. 11 1
      src/components/ledger/lib/spaceSelect.vue
  70. 6 2
      src/components/ledger/lib/system.vue
  71. 4 4
      src/components/ledger/lib/uploadFiles.vue
  72. 14 9
      src/components/ledger/lib/uploadImgsName.vue
  73. 1 1
      src/components/ledger/rentList/roomCountDrawer.vue
  74. 62 62
      src/components/ledger/report/dataexport.vue
  75. 2 2
      src/components/ledger/system/dialog/addCenoteDialog.vue
  76. 97 43
      src/components/ledger/system/dialog/addEquipDialog.vue
  77. 27 9
      src/components/ledger/system/dialog/addSpaceDialog.vue
  78. 1 1
      src/components/ledger/system/table/cenoteTable.vue
  79. 2 2
      src/components/ledger/system/table/deviceTable.vue
  80. 71 34
      src/components/ledger/system/table/spaceTable.vue
  81. 2 1
      src/components/model/file/addFloorDialog.vue
  82. 1 1
      src/components/model/file/addFolder.vue
  83. 2 2
      src/components/model/file/changeFolderName.vue
  84. 1 1
      src/components/model/file/floorTable.vue
  85. 4 4
      src/components/model/file/versionDialog.vue
  86. 1 1
      src/components/point/dynamicdata/delRelationDialog.vue
  87. 1 1
      src/components/point/dynamicdata/floorRules.vue
  88. 26 67
      src/components/ready/buildfloor/addBuild.vue
  89. 5 13
      src/components/ready/buildfloor/addConnectivity.vue
  90. 2 2
      src/components/ready/buildfloor/buildfloorCascader.vue
  91. 141 91
      src/components/ready/buildfloor/formItems.vue
  92. 305 302
      src/components/relation/overview/CardList.vue
  93. 385 450
      src/components/relation/overview/Modal/RelationMaintain.vue
  94. 2 1
      src/components/relation/overview/Modal/getCascader.vue
  95. 3 2
      src/components/relation/overview/Modal/setCascader.vue
  96. 31 18
      src/components/relation/relationShip/Modal/addRelationShip.vue
  97. 103 23
      src/components/relation/relationShip/Modal/exportExcel.vue
  98. 22 23
      src/data/deviceList.js
  99. 18 8
      src/data/menus.js
  100. 0 0
      src/framework/components/messagesever/index.vue

+ 537 - 0
config/conf.js

@@ -0,0 +1,537 @@
+/**
+ * Info: formal、235、14(测试)、18(研发测试)、39(项目组)
+ */
+module.exports = {
+  "18": {
+    "/admin": {
+      target: "http://mbi.sagacloud.cn:8080/",
+      changeOrigin: true,
+      pathRewrite: {
+        "^/admin": "/"
+      }
+    },
+    "/api": {
+      target: "http://192.168.64.17:28888/",
+      changeOrigin: true,
+      pathRewrite: {
+        "^/api": "/"
+      }
+    },
+    "/data-platform-3": {
+      // 目标 API 地址
+      target: "http://39.97.179.199:9909/",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/rwd": {
+      // 目标 API 地址
+      target: "http://39.102.40.239:9970/",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/business-space": {
+      // 目标 API 地址
+      target: "http://39.97.179.199:9909",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/pointconfig": {
+      // 目标 API 地址
+      target: "http://mbi.sagacloud.cn:8080/",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/venders-dp": {
+      // 目标 API 地址
+      target: "http://39.97.179.199:9909",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/venders": {
+      // 目标 API 地址
+      target: "http://39.97.179.199:9909",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/ScanBuilding": {
+      // 目标 API 地址
+      target: "http://mbi.sagacloud.cn:8080/",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/scanbuilding-2": {
+      // 目标 API 地址
+      target: "http://mbi.sagacloud.cn:8080/",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/scanbuilding": {
+      // 目标 API 地址
+      target: "http://192.168.64./17:28888",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/image-service": {
+      // 目标 API 地址
+      target: "http://39.97.179.199:8891",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false,
+      pathRewrite: {
+        "^/image-service": "/image-service/"
+      }
+    },
+    "/modelapi": {
+      target: "http://192.168.64.17:28890/",
+      changeOrigin: true,
+      pathRewrite: {
+        "^/modelapi": "/revit-algorithm/"
+      }
+    },
+    "/schedulerapi": {
+      target: "http://60.205.177.43:28888/",
+      // target: 'http://mbi.sagacloud.cn:8080',
+      changeOrigin: true,
+      pathRewrite: {
+        "^/schedulerapi": "/scheduler/"
+      }
+    }
+  },
+  "14": {
+    // 新版数据字典
+    "/admin": {
+      target: "http://mbi.sagacloud.cn:8080/",
+      changeOrigin: true,
+      pathRewrite: {
+        "^/admin": "/"
+      }
+    },
+    "/api": {
+      target: "http://192.168.64.14:28888/",
+      changeOrigin: true,
+      pathRewrite: {
+        "^/api": "/"
+      }
+    },
+    "/data-platform-3": {
+      // 目标 API 地址
+      target: "http://39.97.179.199:9909/",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/rwd": {
+      // 目标 API 地址
+      target: "http://39.102.40.239:9970/",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/business-space": {
+      // 目标 API 地址
+      target: "http://39.97.179.199:9909",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/pointconfig": {
+      // 目标 API 地址
+      target: "http://mbi.sagacloud.cn:8080/",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/venders-dp": {
+      // 目标 API 地址
+      target: "http://39.97.179.199:9909",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/venders": {
+      // 目标 API 地址
+      target: "http://39.97.179.199:9909",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/ScanBuilding": {
+      // 目标 API 地址
+      target: "http://mbi.sagacloud.cn:8080/",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/scanbuilding-2": {
+      // 目标 API 地址
+      target: "http://mbi.sagacloud.cn:8080/",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/scanbuilding": {
+      // 目标 API 地址
+      target: "http://192.168.64.14:28888",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/image-service": {
+      // 目标 API 地址
+      target: "http://39.97.179.199:8891",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false,
+      pathRewrite: {
+        "^/image-service": "/image-service/"
+      }
+    },
+    "/modelapi": {
+      target: "http://192.168.64.14:28888/",
+      changeOrigin: true,
+      pathRewrite: {
+        "^/modelapi": "/revit-algorithm/"
+      }
+    },
+    "/schedulerapi": {
+      target: "http://60.205.177.43:28888/",
+      changeOrigin: true,
+      pathRewrite: {
+        "^/schedulerapi": "/scheduler/"
+      }
+    }
+  },
+  "39": {
+    "/admin": {
+      target: "http://39.102.40.239:8080/",
+      changeOrigin: true,
+      pathRewrite: {
+        "^/admin": "/"
+      }
+    },
+    "/api": {
+      target: "http://39.102.40.239:8080/",
+      changeOrigin: true,
+      pathRewrite: {
+        "^/api": "/"
+      }
+    },
+    "/data-platform-3": {
+      // 目标 API 地址
+      target: "http://39.97.179.199:9909/",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/rwd": {
+      // 目标 API 地址
+      target: "http://39.102.40.239:9970/",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/business-space": {
+      // 目标 API 地址
+      target: "http://39.97.179.199:9909",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/pointconfig": {
+      // 目标 API 地址
+      target: "http://39.102.40.239:8080/",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/venders-dp": {
+      // 目标 API 地址
+      target: "http://39.97.179.199:9909",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/venders": {
+      // 目标 API 地址
+      target: "http://39.97.179.199:9909",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/ScanBuilding": {
+      // 目标 API 地址
+      target: "http://39.102.40.239:8080/",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/scanbuilding-2": {
+      // 目标 API 地址
+      target: "http://39.102.40.239:8080/",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/scanbuilding": {
+      // 目标 API 地址
+      target: "http://39.102.40.239:8080/",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false
+    },
+    "/image-service": {
+      // 目标 API 地址
+      target: "http://39.97.179.199:8891",
+      // 如果要代理 websockets
+      ws: true,
+      // 将主机标头的原点更改为目标URL
+      changeOrigin: false,
+      pathRewrite: {
+        "^/image-service": "/image-service/"
+      }
+    },
+    "/modelapi": {
+      target: "http://39.102.40.239:8080/",
+      changeOrigin: true,
+      pathRewrite: {
+        "^/modelapi": "/revit-algorithm/"
+      }
+    },
+    "/schedulerapi": {
+      target: "http://39.102.40.239:8080/",
+      changeOrigin: true,
+      pathRewrite: {
+        "^/schedulerapi": "/scheduler/"
+      }
+    }
+  },
+  formal: {
+    //正式环境
+    "/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
+    },
+    "/scanbuilding-2": {
+      // 目标 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/"
+      }
+    }
+  },
+  "235": {
+    //235测试环境
+    "/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
+    },
+    "/scanbuilding-2": {
+      // 目标 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": "/"
+      }
+    }
+  }
+};

+ 5 - 325
config/index.js

@@ -3,337 +3,15 @@
 // see http://vuejs-templates.github.io/webpack for documentation.
 
 const path = require('path')
+const proxyTable = require('./conf')
 
 module.exports = {
   dev: {
     // Paths
     assetsSubDirectory: 'static',
     assetsPublicPath: '/',
+    proxyTable: proxyTable["14"],
 
-    // 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
-    //   },
-    //   '/scanbuilding-2': {
-    //     // 目标 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: {  //235测试环境
-    //   '/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
-    //   },
-    //   '/scanbuilding-2': {
-    //     // 目标 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://192.168.12.238:8080/',
-        target: 'http://mbi.sagacloud.cn:8080/',
-        changeOrigin: true,
-        pathRewrite: {
-          "^/admin": "/"
-        }
-      },
-      '/api': {
-        target: 'http://60.205.177.43:8080',
-        changeOrigin: true,
-        pathRewrite: {
-          "^/api": "/"
-        }
-      },
-      '/data-platform-3': {
-        // 目标 API 地址
-        // target: 'http://172.16.42.210:8080/',
-        target: 'http://api.sagacloud.cn/',
-        // 如果要代理 websockets
-        ws: true,
-        // 将主机标头的原点更改为目标URL
-        changeOrigin: false
-      },
-      '/rwd': {
-        // 目标 API 地址
-        // target: 'http://172.16.42.210:8080/',
-        target: 'http://39.102.40.239:9970/',
-        // 如果要代理 websockets
-        ws: true,
-        // 将主机标头的原点更改为目标URL
-        changeOrigin: false
-      },
-      '/business-space': {
-        // 目标 API 地址
-        // target: 'http://172.16.42.210:8080/',
-        target: 'http://api.sagacloud.cn/',
-
-        // 如果要代理 websockets
-        ws: true,
-        // 将主机标头的原点更改为目标URL
-        changeOrigin: false
-      },
-      '/pointconfig': {
-        // 目标 API 地址
-        // target: 'http://192.168.12.238:8080/',
-        target: 'http://mbi.sagacloud.cn:8080/',
-        // 如果要代理 websockets
-        ws: true,
-        // 将主机标头的原点更改为目标URL
-        changeOrigin: false
-      },
-      '/venders-dp': {
-        // 目标 API 地址
-        // target: 'http://172.16.42.210:8080/',
-        target: 'http://api.sagacloud.cn/',
-        // 如果要代理 websockets
-        ws: true,
-        // 将主机标头的原点更改为目标URL
-        changeOrigin: false
-      },
-      '/venders': {
-        // 目标 API 地址
-        // target: 'http://172.16.42.210:8080/',
-        target: 'http://api.sagacloud.cn/',
-        // 如果要代理 websockets
-        ws: true,
-        // 将主机标头的原点更改为目标URL
-        changeOrigin: false,
-        pathRewrite: {
-          "^/venders": "/dp-auxiliary/venders/"
-        }
-      },
-      '/ScanBuilding': {
-        // 目标 API 地址
-        // target: 'http://192.168.12.238:8080/',
-        target: 'http://mbi.sagacloud.cn:8080/',
-        // 如果要代理 websockets
-        ws: true,
-        // 将主机标头的原点更改为目标URL
-        changeOrigin: false
-      },
-      '/scanbuilding-2': {
-        // 目标 API 地址
-        // target: 'http://192.168.12.238:8080/',
-        target: 'http://mbi.sagacloud.cn:8080/',
-        // 如果要代理 websockets
-        ws: true,
-        // 将主机标头的原点更改为目标URL
-        changeOrigin: false
-      },
-      '/scanbuilding': {
-        // 目标 API 地址
-        // target: 'http://192.168.12.238:8080/',
-        target: 'http://60.205.177.43:8080',
-        // 如果要代理 websockets
-        ws: true,
-        // 将主机标头的原点更改为目标URL
-        changeOrigin: false
-      },
-      '/image-service': {
-        // 目标 API 地址
-        target: 'http://60.205.177.43:8080/',
-        // target: 'http://api.sagacloud.cn',
-        // 如果要代理 websockets
-        ws: true,
-        // 将主机标头的原点更改为目标URL
-        changeOrigin: false,
-        // pathRewrite: {
-        //   "^/image-service": "/dp-auxiliary/image-service/"
-        // }
-        pathRewrite: {
-          "^/image-service": "/image-service/"
-        }
-      },
-      '/modelapi': {
-        // target: 'http://172.16.42.210:8082',
-        target: 'http://60.205.177.43:8080/',
-        // target: 'http://192.168.20.218:8082',//景灏
-        changeOrigin: true,
-        pathRewrite: {
-          "^/modelapi": "/revit-algorithm/"
-        }
-      },
-      '/schedulerapi': {
-        target: 'http://60.205.177.43:8080/',
-        // target: 'http://mbi.sagacloud.cn:8080',
-        changeOrigin: true,
-        pathRewrite: {
-          "^/schedulerapi": "/scheduler/"
-        }
-      },
-    },
     // 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
@@ -364,7 +42,9 @@ module.exports = {
     // Paths
     assetsRoot: path.resolve(__dirname, '../dist'),
     assetsSubDirectory: 'static',
-    assetsPublicPath: '/adm/',
+    // assetsPublicPath: '/adm/',// 39 配置
+    assetsPublicPath: '/',
+
 
     /**
      * Source Maps

+ 5 - 2
config/prod.env.js

@@ -1,9 +1,12 @@
 'use strict'
 module.exports = {
   NODE_ENV: '"production"',
-  BASE_URL: '"http://39.102.40.239"', //测试iframe地址
+  BASE_URL: '"http://192.168.64.14"', //测试iframe地址
+  // BASE_URL: '"http://192.168.64.18"', //测试iframe地址
+//   BASE_URL: '"http://39.102.40.239"', //测试iframe地址
   SSO_SERVER: '"http://mbi.sagacloud.cn"', //测试环境
-  MQTT_SERVICE: '"ws://39.102.40.239:61614/stomp/"' //MQ测试环境地址
+  // MQTT_SERVICE: '"ws://39.102.40.239:61614/stomp/"' //MQ测试环境地址
+  MQTT_SERVICE: '"ws://192.168.64.14:61614/stomp/"' //MQ测试环境地址
   // SSO_SERVER: '"http://172.16.44.235:8081"', //测试环境
   // BASE_URL: '"http://192.168.20.236"', //(新)测试iframe地址
   // SSO_SERVER: '"http://192.168.20.236:8086"', //(新)测试环境

+ 6 - 6
package.json

@@ -5,10 +5,10 @@
   "author": "yaoll <yaolinlin@sagacloud.cn>",
   "private": true,
   "remote": {
-    "host": "192.168.20.236",
-    "path": "/opt/nginx/ibms/dist",
+    "host": "192.168.64.18",
+    "path": "/root/apps/web/adm/dist",
     "user": "root",
-    "password": "saga",
+    "password": "persagy@2020",
     "local": "dist"
   },
   "scripts": {
@@ -20,9 +20,9 @@
   },
   "dependencies": {
     "@saga-web/base": "2.1.27",
-    "@saga-web/cad-engine": "2.0.581",
-    "@saga-web/draw": "2.1.110",
-    "@saga-web/graph": "2.1.133",
+    "@saga-web/cad-engine": "2.0.594",
+    "@saga-web/draw": "2.1.113",
+    "@saga-web/graph": "2.1.138",
     "axios": "^0.18.0",
     "echarts": "^4.1.0",
     "el-cascader-multi": "^1.1.8",

+ 29 - 1
src/api/dict/index.js

@@ -1,4 +1,4 @@
-import {baseUrl, dict} from "@/api/scan/config";
+import {baseUrl, dict, component_dict} from "@/api/scan/config";
 import http from "@/api/scan/httpUtil";
 
 //头部信息查询(查询所有设备类型-所有部件类型-所有系统类型-所有专业类型)
@@ -24,3 +24,31 @@ export function setDataDictionary(param, success) {
   let url = `${baseUrl}${dict}/setting-dic-project`;
   http.postJson(url, param, success)
 }
+
+/**
+ * 字典统一配置(切换到equip-component服务上)
+ */
+
+// 头部信息查询(查询所有设备类型-所有部件类型-所有系统类型-所有专业类型)
+export function dictCategory(param, success) {
+    let url = `${baseUrl}${component_dict}/category`;
+    http.postJson(url, param, success);
+}
+
+//查询项目下类型的信息点
+export function dictQuery(param, success) {
+    let url = `${baseUrl}${component_dict}/query`;
+    http.postJson(url, param, success);
+}
+
+//设置-项目定制化字典
+export function setDicProject(param, success) {
+    let url = `${baseUrl}${component_dict}/setting-dic-project`;
+    http.postJson(url, param, success)
+}
+
+//需采集信息同步到所有项目
+export function synDicProject(param, success) {
+    let url = `${baseUrl}${component_dict}/syn-dic-project`;
+    http.getJson(url, param, success)
+}

+ 5 - 0
src/api/httputils.js

@@ -19,6 +19,11 @@ const axiosservice = axios.create({
 
 axiosservice.interceptors.request.use(
     config => {
+        config.cancelToken = new axios.CancelToken(cancel => {
+            if (config.url !== '/api/message-center/message/update-state' || config.url !== '/image-service/common/multipart_upload') {
+                store.commit('setAxiosArr', {cancel})
+            }
+        })
         config.withCredentials = true // 允许携带token ,这个是解决跨域产生的相关问题
         let token = store.getters['ssoToken']
         if (token) {

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

@@ -17,6 +17,13 @@ export function graphicNumber(param, success) {
 
 }
 
+// 查询总览数量-根据类型查询关系数量
+export function graphicTypeNumber(param, success) {
+  let url = `${baseUrl}${graphicUrl}/type/query-count?type=${param.type}`
+  httpUtil.postJson(url, {}, success)
+
+}
+
 //导入excel
 export function graphicUpload(param, success) {
   let url = `${baseUrl}${graphicUrl}/import`
@@ -176,6 +183,6 @@ export function addSource(param, success) {
 
 //查看源设备
 export function sourceQuery(param, success) {
-  let url = `${baseUrl}${dataCenter}/mep-system-calc/source/query`
-  httpUtil.postJson(url, param, success)
+  let url = `${baseUrl}${dataCenter}/mep-system-calc/source/query?calcName=${param.calcName}`
+  httpUtil.getJson(url, {}, success)
 }

+ 3 - 0
src/api/scan/config.js

@@ -10,6 +10,7 @@ export const component = '/equip-component'
 export const physics = '/data-platform-3';
 export const business = '/business-space'
 export const rwd = '/rwd'
+export const datasyn = '/datasyn'
 /******************* 适配新版数据字典接口 *********************/
 export const object = dataCenter + '/object'
 export const rel = dataCenter + '/rel'
@@ -21,12 +22,14 @@ export const shaft = object + '/shaft'
 export const tenant = dataCenter + '/tenant'
 export const floor = object + '/floor'
 export const dict = dataCenter + '/dict'
+export const component_dict = component + '/dict'
 export const classDef = dataCenter + '/class-def'
 export const locationPoint = object + '/location-point'
 export const modelScanTask = dataCenter + '/model-scan-task'
 export const equipScanTask = dataCenter + '/equip-scan-task'
 export const shContainSp = rel + '/sh-contain-sp-base'
 export const statistics = dataCenter + '/statistics'
+export const stat = component + '/statistics'
 export const graphicUrl = dataCenter + '/graphic'
 export const compSpace = component + '/space'
 export const compEquipQuery = component + '/equip-query'

+ 6 - 0
src/api/scan/fetch.js

@@ -1,6 +1,7 @@
 import Vue from 'vue'
 import axios from 'axios'
 import vueAxios from 'vue-axios'
+import store from '@/store'
 import { Message } from 'element-ui';
 
 Vue.use(vueAxios, axios)
@@ -13,6 +14,11 @@ const service = axios.create({
 
 //request拦截
 service.interceptors.request.use(config => {
+    config.cancelToken = new axios.CancelToken(cancel => {
+        if (config.url !== '/api/message-center/message/update-state' || config.url !== '/image-service/common/multipart_upload') {
+            store.commit('setAxiosArr', {cancel})
+        }
+    })
   return config
 }, error => {
   console.log(error)

+ 13 - 9
src/api/scan/httpUtil.js

@@ -1,6 +1,7 @@
-import { Message } from 'element-ui';
+import {Message} from 'element-ui';
 import fetch from './fetch'
 import storage from '@/framework/utils/storage'
+import store from '@/store/index'
 
 function successResponse(vm, response, success, failed) {
   let resp = response.data;
@@ -21,6 +22,8 @@ function successResponse(vm, response, success, failed) {
 
 function errorResponse(vm, response, err) {
   let json = JSON.parse(JSON.stringify(response))
+  if (json.message === '路由调整取消请求')
+  return 
   console.error(response)
   if (json.response) {
     Message.error({ message: `接口:${json.response.config.url}请求错误,错误状态为:${json.response.status}` })
@@ -49,15 +52,15 @@ function downFile(blob, fileName) {
 
 export default {
   getJson: function (url, data, success, failed, err) {
-    let ProjectId = localStorage.getItem("projectId")
-    // let ProjectId = "Pj1101050029"
-    let userName = storage.get("user_name")
+    let ProjectId = store.state.layout.projectId ? store.state.layout.projectId : localStorage.getItem("projectId");
+    let userName = store.state.layout.userInfo.userName ? store.state.layout.userInfo.userName : storage.get("user_name");
+    let group_code = store.state.layout.group_code ? store.state.layout.group_code : localStorage.getItem("group_code");
     let vm = this;
     fetch({
       url: url,
       method: 'get',
       params: data,
-      headers: { 'ProjectId': ProjectId, 'Comming': 'adm', 'Account': userName }
+      headers: {'projectId': ProjectId, 'appId': 'adm', 'userId': userName, 'groupCode': group_code}
     }).then((response) => {
       successResponse(vm, response, success, failed)
     }).catch(error => {
@@ -65,15 +68,16 @@ export default {
     });
   },
   postJson: function (url, data, success, failed, err) {
-    let ProjectId = localStorage.getItem("projectId")
-    // let ProjectId = "Pj1101050029"
-    let userName = storage.get("user_name")
+    let ProjectId = store.state.layout.projectId ? store.state.layout.projectId : localStorage.getItem("projectId");
+    let userName = store.state.layout.userInfo.userName ? store.state.layout.userInfo.userName : storage.get("user_name");
+    let group_code = store.state.layout.group_code ? store.state.layout.group_code : localStorage.getItem("group_code");
+
     let vm = this;
     fetch({
       url: url,
       method: 'post',
       data: data,
-      headers: { 'ProjectId': ProjectId, 'Comming': 'adm', 'Account': userName }
+      headers: {'projectId': ProjectId, 'appId': 'adm', 'userId': userName, 'groupCode': group_code}
     }).then((response) => {
       successResponse(vm, response, success, failed)
     }).catch(error => {

+ 45 - 48
src/api/scan/request.js

@@ -24,7 +24,8 @@ import {
   system,
   tenant,
   venders,
-  zone
+  zone,
+  stat
 } from './config.js'
 import http from './httpUtil'
 import storage from '@/framework/utils/storage'
@@ -74,25 +75,25 @@ export function dowmloadLog(
 
 //获取扫楼用户表格
 export function getUser(param, success) {
-  let url = `${api1}/service/user/query`
+  let url = `${scan}/service/user/query`
   http.postJson(url, param, success)
 }
 
 //修改扫楼用户
 export function loadUser(param, success) {
-  let url = `${api1}/service/user/update`;
+  let url = `${scan}/service/user/update`;
   http.postJson(url, param, success)
 }
 
 //删除扫楼用户
 export function delUser(param, success) {
-  let url = `${api1}/service/user/delete`;
+  let url = `${scan}/service/user/delete`;
   http.postJson(url, param, success)
 }
 
 //添加扫楼用户
 export function addUser(param, success) {
-  let url = `${api1}/service/user/create`;
+  let url = `${scan}/service/user/create`;
   http.postJson(url, param, success)
 }
 
@@ -369,29 +370,6 @@ export function defaultFloor(param) {
 //   return fetch({ method: 'POST', url: `${godhand}/equipment/create?projectId=${param.perjectId}&secret=${param.secret}`, data })
 // }
 
-
-//物理世界新建岗位(部件)
-export function createComponent(param) {
-  let data = {
-    "building_id": param.BuildId,
-    "component_category": param.category,
-    "floor_id": param.BIMID,
-    "infos": {
-      "BIMID": [
-        { "value": param.BIMID }
-      ],
-      "BIMLocation": [
-        { "value": param.BIMLocation }
-      ]
-    }
-  }
-  return fetch({
-    method: 'POST',
-    url: `${physics}/component/create?projectId=${param.perjectId}&secret=${param.secret}`,
-    data
-  })
-}
-
 //通过岗位id查询元空间id
 export function getSpaceId(param) {
   let data = {
@@ -829,7 +807,7 @@ export function EqToAssets(param, success) {
 
 //台账中待删除的对象
 export function queryLederDelObject(param, success) {
-  let url = `${baseUrl}${statistics}/object-delete-count`
+  let url = `${baseUrl}${stat}/object-delete-count`
   http.postJson(url, param, success)
 }
 
@@ -861,13 +839,13 @@ export function queryCenoteCount(param, success) {
 
 //竖井-按功能类型占比
 export function queryShaftFunctionType(param, success) {
-  let url = `${baseUrl}${statistics}/shaft-functype-count`
+  let url = `${baseUrl}${stat}/shaft-functype-count`
   http.postJson(url, param, success)
 }
 
 //竖井-关联业务空间完成度
 export function ShaftRelationBusinessSpace(param, success) {
-  let url = `${baseUrl}${statistics}/shaft2sp-count`
+  let url = `${baseUrl}${stat}/shaft2sp-count`
   http.postJson(url, param, success)
 }
 
@@ -927,7 +905,7 @@ export function shaftSpaceQuery(param, success) {
 
 //获取未和当前竖井关联的业务空间
 export function shaftUnlinkSpaceQuery(param, success) {
-  let url = `${baseUrl}${shaft}/un-shaft-zoneSpaceBaseTable?ShaftId=${param.ShaftId}`
+  let url = `${baseUrl}${shaft}/un-shaft-zoneSpaceBaseTable?shaftId=${param.ShaftId}`
   http.postJson(url, param.data, success)
 }
 
@@ -963,12 +941,12 @@ export function getRentTableData(param, success) {
 
 //根据条件查询统计数量
 export function queryRentCount(param, success) {
-  let url = `${baseUrl}${tenant}/count`
+  let url = `${baseUrl}${object}/tenant/count`
   http.postJson(url, param, success)
 }
 
 export function queryTenantCompletion(param, success) {
-  let url = `${baseUrl}${statistics}/tenant2sp-count`
+  let url = `${baseUrl}${stat}/tenant2sp-count`
   http.postJson(url, param, success)
 }
 
@@ -1048,19 +1026,20 @@ export function saveRentRelateSpace(param, success) {
 
 //根据条件查询分区数量
 export function queryZoneCount(param, success) {
-  let url = `${baseUrl}${dataCenter}/zonespacebase/count`
+  // let url = `${baseUrl}${dataCenter}/zonespacebase/count`
+  let url = `${baseUrl}${object}/zone/count`
   http.postJson(url, param, success)
 }
 
 //业务空间-各分区占比
 export function queryPartitionRatio(param, success) {
-  let url = `${baseUrl}${statistics}/sp-objecttype-count`
+  let url = `${baseUrl}${stat}/sp-objecttype-count`
   http.postJson(url, param, success)
 }
 
 //业务空间-默认分区功能类型占比
 export function queryDefaultFunTypes(param, success) {
-  let url = `${baseUrl}${statistics}/general-sp-functype-count`
+  let url = `${baseUrl}${stat}/general-sp-functype-count`
   http.postJson(url, param, success)
 }
 
@@ -1200,26 +1179,26 @@ export function getEquipPartsCon(param, success) {
 
 //设备清单 - 新增部件
 export function createPart(param, success) {
-  let url = `${baseUrl}${dataCenter}/component/create`;
+  let url = `${baseUrl}${object}/component/create`;
   http.postJson(url, param, success)
 }
 
 // 查询部件总数
 export function queryPart(param, success) {
-  let url = `${baseUrl}${dataCenter}/component/count`;
+  let url = `${baseUrl}${object}/component/count`;
   http.postJson(url, param, success)
 }
 
 //设备清单 - 删除部件
 export function deleteParts(param, success) {
-  let url = `${baseUrl}${dataCenter}/component/delete?projectId=${param.projectId}`;
+  let url = `${baseUrl}${object}/component/delete?projectId=${param.projectId}`;
   let data = param.data;
   http.postJson(url, data, success)
 }
 
 //设备清单 - 更新部件
 export function updateParts(param, success) {
-  let url = `${baseUrl}${dataCenter}/component/update?projectId=${param.projectId}`;
+  let url = `${baseUrl}${object}/component/update?projectId=${param.projectId}`;
   let data = param.data;
   http.postJson(url, data, success)
 }
@@ -1273,7 +1252,7 @@ export function querySysLinkBuild(param, success) {
 
 //设备清单 - 设备关联系统 设备1-n
 export function equipLinkSys(param, success) {
-  let url = `${baseUrl}${dataCenter}/sy-in-eq/link-sy`;
+  let url = `${baseUrl}${dataCenter}/rel/sy-in-eq/link-sy`;
   http.postJson(url, param, success)
 }
 
@@ -1292,7 +1271,7 @@ export function sysUnlinkEquip(param, success) {
 
 //设备清单 - 统计项目下所有设备数量
 export function countEquip(param, success) {
-  let url = `${baseUrl}${dataCenter}/equip/count`;
+  let url = `${baseUrl}${object}/equip/count`;
   http.postJson(url, param, success)
 }
 
@@ -1403,7 +1382,7 @@ export function countProperty(param, success) {
 
 //根据id删除资产信息
 export function deleteProperty(param, success) {
-  let url = `${baseUrl}${dataCenter}/property/delete`;
+  let url = `${baseUrl}${object}/property/delete`;
   http.postJson(url, param, success)
 }
 
@@ -1658,7 +1637,7 @@ export function floorQueryAndSign(param, success) {
 
 //查询建筑信息
 export function buildingQuery(param, success) {
-  let url = `${baseUrl}${dataCenter}/building/query`;
+  let url = `${baseUrl}${object}/building/query`;
   http.postJson(url, param, success)
 }
 
@@ -1786,6 +1765,12 @@ export function manageDeleteFloor(param, success) {
   http.postJson(url, param, success)
 }
 
+//建筑楼层管理-删除楼层(该接口有删除失败的原因)
+export function deleteFloorInfo(param, success) {
+	let url = `${baseUrl}${floor}/single/delete`;
+	http.postJson(url, param, success)
+}
+
 //建筑楼层管理-修改楼层
 export function manageUpdateFloor(param, success) {
   let url = `${baseUrl}${floor}/update`;
@@ -1921,7 +1906,7 @@ export function linkShaft(param, success) {
 
 //系统所在的竖井,竖井一对多,累计添加,此方法不会覆盖以前记录
 export function linkSySh(param, success) {
-  let url = `${baseUrl}${dataCenter}/sy-in-sh/link-sy-sh`;
+  let url = `${baseUrl}${rel}/sy-in-sh/link-sy-sh`;
   http.postJson(url, param, success)
 }
 
@@ -2255,7 +2240,7 @@ export function getFloorMsgByFloorID(param, success) {
 
 // 不能同步到物理世界的关系数据
 export function notSyncRelationData(param, success) {
-  let url = `${baseUrl}${statistics}/unsyn-relation-count`
+  let url = `${baseUrl}${stat}/unsyn-relation-count`
   http.postJson(url, param, success)
 }
 
@@ -2268,7 +2253,7 @@ export function notSyncObject(param, success) {
 
 // 岗位和关联的资产信息点值不一致
 export function postRelationInforAtpism(param, success) {
-  let url = `${baseUrl}${statistics}/eq2pe-count`
+  let url = `${baseUrl}${stat}/eq2pe-count`
   http.postJson(url, param, success)
 }
 
@@ -2368,9 +2353,21 @@ export function objectDeleteBuild(param, success) {
   http.postJson(url, param, success)
 }
 
+//根据id删除建筑信息(该接口有删除失败的原因)
+export function deleteBuildInfo(param, success) {
+  let url = `${baseUrl}${object}/building/single/delete`
+  http.postJson(url, param, success)
+}
+
 // 查询记录
 export function problemQuery(param, success) {
   // let url = `${baseUrl}${dataCenter}/problems/query`
   let url = `${baseUrl}${scan}/task/problems/query`
   http.postJson(url, param, success)
 }
+
+// 关系-竖井所在建筑
+export function shaftLinkBuild(param, success) {
+    let url = `${baseUrl}${rel}/sh-in-bd/link-bd`
+    http.postJson(url, param, success)
+}

+ 50 - 0
src/api/synclog/index.js

@@ -0,0 +1,50 @@
+import { baseUrl, datasyn } from "@/api/scan/config";
+import httputils from "@/api/scan/httpUtil";
+
+/**
+ * 查询项目id对应得集团id
+ * @param { 接口参数 } param
+ */
+ export function queryGroupCode(param, success, error) {
+	return httputils.getJson(`${baseUrl}${datasyn}/record/query/project`, param, success, error)
+}
+
+/**
+ * 查询项目下得日志
+ * @param { 接口参数 } param
+ */
+export function queryTableList(param, success, error) {
+    return httputils.postJson(`${baseUrl}${datasyn}/record/query`, param, success, error)
+}
+
+/**
+ * 查询对象类型
+ * @param { 接口参数 } param
+ */
+export function queryobjType(param, success, error) {
+    return httputils.getJson(`${baseUrl}${datasyn}/record/query/type`, param, success, error)
+}
+
+/**
+ * 查询中台是否在线
+ * @param { 接口参数 } param
+ */
+export function queryIsOnline(param, success, error) {
+    return httputils.getJson(`${baseUrl}${datasyn}/record/query/online`, param, success, error)
+}
+
+/**
+ * 重新同步消息
+ * @param { 接口参数 } param
+ */
+export function queryRecordSyn(param, success, error) {
+    return httputils.postJson(`${baseUrl}${datasyn}/record/syn/data`, param, success, error)
+}
+
+/**
+ * 更新日志信息
+ * @param { 接口参数 } param
+ */
+export function queryRecordUpdata(param, success, error) {
+    return httputils.postJson(`${baseUrl}${datasyn}/record/update`, param, success, error)
+}

BIN
src/assets/image/no-data.png


+ 0 - 1
src/assets/js/jsmind.js

@@ -441,7 +441,6 @@
             }
             // remove from global nodes
             delete this.nodes[node.id];
-            // clean all properties
             for (var k in node) {
                 delete node[k];
             }

+ 63 - 47
src/components/business_space/business/handsontable.vue

@@ -78,7 +78,6 @@ 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"
@@ -96,7 +95,7 @@ import {
   zoneQuery,
   zoneUpdate
 } from "@/api/scan/request";
-import { mapGetters } from "vuex";
+import {mapGetters} from "vuex";
 import dialogZone from "../../ledger/addDialog/dialogZone";
 
 export default {
@@ -108,17 +107,16 @@ export default {
   components: {
     qrcode, //二维码页面
     myPagination,
-    addBusiness,
     uploadImgDialog,
     dialogZone,
     spaceCascader,
   },
   computed: {
-    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+    ...mapGetters("layout", ["projectId", "secret", "userId", "group_code"]),
     showTypes() {
       return this.onlyRead ?
-        [{ value: "Visible", label: '只看采集信息' }, { value: "all", label: '全部' }] :
-        [{ value: "Visible", label: '只看采集信息' }, { value: "all", label: '全部' }]
+        [{value: "Visible", label: '只看采集信息'}, {value: "all", label: '全部'}] :
+        [{value: "Visible", label: '只看采集信息'}, {value: "all", label: '全部'}]
     }
   },
   data() {
@@ -140,7 +138,7 @@ export default {
         label: '编辑模式'
       }],
       onlyRead: true,
-      showType: "",
+      showType: "Visible",
       page: {
         pageSize: 50,
         pageSizes: [10, 20, 50, 100],
@@ -159,11 +157,12 @@ export default {
       zoneItemID: '',
       inputMap: {
         flowBuild: {
-          inputMode: 'D1',
           editable:true,
           code:"flowBuild",
           name:"建筑楼层",
-          path:"flowBuild"
+          path:"flowBuild",
+          category: 'STATIC',
+          dataType: "ENUM"
         }
       }, //信息点和输入方式映射表
       updateInputShow: false, //是否显示临时维护输入框
@@ -218,7 +217,7 @@ export default {
 
     getData() {
       this.zoneParam = {
-        classCode: this.zoneCode,
+        zoneType: this.zoneCode,
         pageNumber: this.page.pageNumber,
         pageSize: this.page.pageSize,
         orders: "createTime desc, localName desc, localId desc, id asc"
@@ -226,7 +225,7 @@ export default {
       if (this.buildFloorSelectd.length === 1) {
         switch (this.buildFloorSelectd[0]) {
           case 'noKnow':
-            this.zoneParam.BuildingId = 'isnull';
+            this.zoneParam.buildingId = 'isnull';
             break;
           case 'all':
             // params.BuildingId = '';
@@ -251,29 +250,34 @@ export default {
       if (this.zoneItemID) {
         this.zoneParam.Filters = `id="${this.zoneItemID}"`
       }
-      if (this.zoneCode != 'OtherZone') {
-        this.isLoading = true
-        this.getZoneMessage(this.zoneParam)
-      } else {
+      this.isLoading = true
+      this.getZoneMessage(this.zoneParam)
+      /**
+       * TODO: 其他分区下已不再划分分区(注释的代码是其他分区下再划分分区的代码)
+       */
+    //   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
+        // if (this.OtherValue) {
+        //   this.zoneParam.ZoneType = this.OtherValue;
+        //   this.getZoneMessage(this.zoneParam)
+        // } else {
+        //   this.main = []
+        // }
+        // this.isLoading = false
         // this.getOtherType();
-      }
+    //   }
     },
     //查询空间信息
     getZoneMessage(param) {
       let params = param
-      params.Orders = "createTime desc,sort asc,localName desc,id desc"
+      params.orders = "createTime desc,localName desc,id desc"
       zoneQuery(params, res => {
         this.page.total = res.total;
         this.main = res.content.map((item) => {
@@ -312,6 +316,10 @@ export default {
     initHot() {
       var container = document.getElementById(this.id);
       let winHeight = document.documentElement.clientHeight;
+      if (this.hot) {
+        this.hot.destroy();
+        this.hot = null;
+      }
       this.hot = new Handsontable(container, {
         data: this.main,
         colHeaders: this.delHeader(this.headers), //表头文案
@@ -327,6 +335,7 @@ export default {
         observeChanges: false,
         language: "zh-CN",
         manualColumnResize: true,
+        fillHandle: 'vertical', //允许纵向填充
         manualColumnMove: true,
         dropdownMenu: [
           "filter_by_condition",
@@ -408,10 +417,16 @@ export default {
         }
       }
       if (!this.onlyRead && !inputData.editable) {
-        this.$message("该信息点的值为自动生成,不可人工维护!");
-        return false;
+        this.$confirm('该信息点的值为自动生成,不可人工维护!', '提示', {
+            confirmButtonText: '我知道了',
+            showCancelButton: false,
+            type: 'warning',
+            center: true
+        }).then(() => {
+            return false;
+        });
       }
-      if (!this.onlyRead && showTools.inputModeArr.indexOf(inputData.inputMode) == '-1') {
+      if (!this.onlyRead && showTools.inputModeArr.indexOf(inputData.dataType) == '-1') {
         this.updateInfoPoint = val;
         this.updateInput = tools.dataForKey(this.tableData[row.row], val);
         this.myDialog.update = true;
@@ -526,8 +541,9 @@ export default {
     updateBusiness(data, change) {
       let param = {
         data: {
-          Content: [],
-          Projection: []
+          content: [],
+          projection: [],
+          nullItems: []
         },
         zone: this.zoneCode
       };
@@ -537,13 +553,18 @@ export default {
         let key = item[1].split(".")[0]
         if (key == "flowBuild" && keyList.indexOf(key) == -1) {
           keyList.push("BuildingId", "FloorId")
-          param.data.Projection.push("BuildingId", "FloorId")
+          param.data.projection.push("BuildingId", "FloorId")
         }
         if (item[1] && keyList.indexOf(key) == -1) {
           keyList.push(key)
         }
-        if (item[1] && item[3] == "" && param.data.Projection.indexOf(key) == -1) {
-          param.data.Projection.push(key)
+        if (item[1] && item[3] == "" && param.data.projection.indexOf(key) == -1) {
+          param.data.projection.push(key)
+          keyList.push(item[1])
+        }
+        // 保存置空字段
+        if (item[1] && item[3] == "" && param.data.nullItems.indexOf(item[1]) == -1) {
+          param.data.nullItems.push(item[1])
         }
       })
       //生成对应修改数据
@@ -570,10 +591,10 @@ export default {
             tools.setDataForKey(item, value, itemData == "" ? null : itemData)
           }
         })
-        param.data.Content.push(item);
+        param.data.content.push(item);
       })
-      if (param.data.Projection.indexOf('BuildingId') > -1) {
-        let pa = param.data.Content.map(t => {
+      if (param.data.projection.indexOf('BuildingId') > -1) {
+        let pa = param.data.content.map(t => {
           return {
             type: this.zoneCode,
             spaceId: t.id,
@@ -590,7 +611,7 @@ export default {
       } else {
         // updateZone(param, (res) => {
         // })
-        let obj = param.data.Content.map(i => {
+        let obj = param.data.content.map(i => {
           i.Outline = typeof i.Outline == 'string' ? JSON.parse(i.Outline) : i.Outline
           return {
             ...i,
@@ -599,7 +620,8 @@ export default {
         })
         let updateParam = {
           content: obj,
-          // projection: param.data.Projection
+          nullItems: param.data.nullItems
+          // projection: param.data.projection
         };
         zoneUpdate(updateParam, res => {
           this.$message.success('更新成功')
@@ -643,18 +665,13 @@ export default {
     //获取动态参数
     getBatch(data) {
       let param = {
-        groupCode: "WD",
+        groupCode: this.group_code,
         appId: "datacenter",
         projectId: this.projectId,
         data: []
       };
       this.headers.map(head => {
-        if (
-          head.InputMode == "L" ||
-          head.InputMode == "L1" ||
-          head.InputMode == "L2" ||
-          head.InputMode == "M"
-        ) {
+        if (head.category != 'STATIC') {
           data.map(item => {
             let cur = tools.dataForKey(item, head.path);
             if (cur) {
@@ -690,8 +707,7 @@ export default {
                       tools.setDataForKey(
                         item,
                         head.path,
-                        child.error
-                        // child.error ? child.value ? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
+                        child.error ? child.value ? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
                       );
                     }
                   });
@@ -907,7 +923,7 @@ export default {
         if (newName && newName[0] && newName[0].value) {
           this.showType = newName[0].value
         } else {
-          this.showType = ""
+          this.showType = "Visible"
         }
       },
       immediate: true,

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

@@ -1,770 +0,0 @@
-<!--
-    上传文件的弹窗
--->
-
-<template>
-  <div v-show="dialog.addDevice">
-    <el-dialog
-      :title="title"
-      :center="isCenter"
-      :visible.sync="dialog.addDevice"
-      :width="width"
-      :fullscreen="isFull"
-    >
-      <div id="addDevice">
-        <div v-show="!isCenter">
-          <my-cascader @change="changeCader"></my-cascader>
-        </div>
-        <div v-if="isCenter">
-          <div>
-            <div class="hanson-bar" style="overflow:hidden;">
-              <el-button
-                style="float:right;"
-                size="small"
-                @click="undo"
-                icon="iconfont icon-undo"
-              >撤销</el-button>
-              <el-button
-                style="float:right;"
-                size="small"
-                @click="reset"
-                icon="iconfont icon-shuaxin"
-              >刷新</el-button>
-              <el-button style="float:right;" size="small" @click="addMain">增加</el-button>
-              <el-input
-                v-model="addNum"
-                placeholder="增加个数"
-                style="width:50px;float:right;"
-                size="small"
-              ></el-input>
-            </div>
-            <div v-show="main && main.length" id="myHandson" ref="myHandson"></div>
-          </div>
-        </div>
-      </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="addSpace">添加业务空间</el-button>
-      </span>
-    </el-dialog>
-    <qrcode :dialog="myDialog" :addBody="true" ref="qrcode"></qrcode>
-    <firm ref="firm" :dialog="myDialog"></firm>
-    <supply-dialog ref="supply" :dialog="myDialog"></supply-dialog>
-    <supplier-dialog ref="supplier" @changeSupplier="supplierChange" :dialog="myDialog"></supplier-dialog>
-    <guarantee-dialog ref="guarantee" :dialog="myDialog"></guarantee-dialog>
-    <upload-files-dialog
-      ref="upload"
-      @changeFile="fileChange"
-      :keysArr="filesArr"
-      :dialog="myDialog"
-    ></upload-files-dialog>
-    <upload-img-dialog @changeFile="imgChange" :keysArr="imgsArr" :dialog="myDialog"></upload-img-dialog>
-    <maintainer-dialog @changeMaintainer="changeMaintainer" ref="maintainer" :dialog="myDialog"></maintainer-dialog>
-    <insurer-dialog @changeInsurer="changeInsurer" ref="insurer" :dialog="myDialog"></insurer-dialog>
-    <pic-dialog :dialog="myDialog" :keysArr="picsArr" @change="changePics"></pic-dialog>
-  </div>
-</template>
-<script>
-
-import myCascader from "@/components/business_space/lib/cascaders/assets";
-// import hansonTable from "@/components/business_space/dialogHanson/addDevice";
-import { getSpaceHeader } from "@/api/scan/request";
-import { mapGetters, mapActions } from "vuex";
-import tools from "@/utils/tools";
-import qrcode from "@/components/business_space/lib/qrcode";
-import firm from "@/components/business_space/dialogs/list/firm";
-import supplyDialog from "@/components/business_space/dialogs/list/supplyDialog";
-import supplierDialog from "@/components/business_space/dialogs/list/supplierDialog";
-import maintainerDialog from "@/components/business_space/dialogs/list/maintainerDialog";
-import insurerDialog from "@/components/business_space/dialogs/list/insurerDialog";
-import guaranteeDialog from "@/components/business_space/dialogs/list/guaranteeDialog";
-import uploadFilesDialog from "@/components/business_space/dialogs/list/filesDialog";
-import uploadImgDialog from "@/components/business_space/dialogs/list/uploadImgDialog";
-import picDialog from "@/components/business_space/dialogs/list/picDialog"
-
-let table = function (num) {
-  let main = []
-  for (let i = 0; i < num; i++) {
-    main.push({})
-  }
-  return main
-}
-export default {
-  components: {
-    myCascader,
-    // hansonTable,
-    qrcode, //二维码页面
-    firm, //
-    supplyDialog,
-    supplierDialog,
-    guaranteeDialog,
-    uploadFilesDialog,
-    maintainerDialog,
-    insurerDialog,
-    uploadImgDialog,
-    picDialog
-  },
-  props: {
-    dialog: {
-      type: Object,
-      default: function () {
-        return {
-          addDevice: false
-        };
-      }
-    },
-    headerData: {
-      type: Array,
-      default: function () {
-        return []
-      }
-    }
-  },
-  computed: {
-    ...mapGetters("layout", ["projectId", "secret", "userId"]),
-  },
-  data() {
-    return {
-      width: "30%",
-      isFull: true,//dialog是否为全屏
-      title: "添加业务空间",
-      isCenter: true,
-      deviceType: {},
-      main: table(10),
-      mess: {},
-      headers: null,
-      page: {
-        size: 50,
-        sizes: [10, 30, 50, 100, 150, 200],
-        total: 400,
-        currentPage: 1
-      },
-      id: null,
-      myDialog: {
-        qrcode: false, //二维码弹窗
-        firm: false, //厂商弹窗
-        supply: false, //选择供应合同
-        supplier: false, //供应商选择
-        guarantee: false, //选择保单
-        maintainer: false, //选择维修商
-        insurer: false, //选择保险公司
-        uploadFiles: false,//上传文件
-        uploadImgs: false,//上传单个图片
-        pic: false, //多个图片
-      },
-      addNum: 1,//增加个数
-      row: null,//被修改的row
-      filesArr: [],//保存临时的文件key
-      messKey: null,
-      imgsArr: [],//临时保存的图片key数组
-      picsArr: [],//临时设备图片keys数组
-    };
-  },
-  created() {
-
-  },
-  mounted() {
-  },
-  methods: {
-    //增加个数
-    addMain() {
-      for (let i = 0; i < this.addNum; i++) {
-        this.main.push({})
-      }
-      this.hot.loadData(this.main)
-    },
-
-    //添加业务空间确定
-    addSpace() {
-      console.log(this.main)
-      let pushData = []
-      this.main.map(item => {
-        if (!!item.infos) {
-          for (let key in item.infos) {
-            if (!!item.infos[key]) {
-              pushData.push(item)
-            }
-          }
-        }
-      })
-      console.log(pushData)
-    },
-
-    //下一步
-    // step(val) {
-    //   if (!!val) {
-    //     this.isFull = true
-    //     this.isCenter = true
-    //     this.title = "添加资产"
-    //     this.getData()
-    //   } else {
-    //     this.isFull = false
-    //     this.isCenter = false
-    //   }
-    // },
-    //修改设备类型
-    changeCader(val) {
-      this.deviceType = val
-    },
-    //获取header的mess
-    getHeader(mess) {
-      this.mess = mess;
-    },
-
-    //获取主体内容
-    // getMain(floorMess) {
-    //   console.log(floorMess);
-    // },
-
-    //获取表头
-    getData() {
-      this.main = table(10)
-      getSpaceHeader({
-        code: "space",
-        ProjId: this.projectId
-      }).then(res => {
-        this.headers = res.data.Content;
-        if (!!this.hot) {
-          this.hot.destroy();
-          this.hot = null;
-        }
-        let data = tools.getItem(this.deviceType.code)
-        if (!!data) {
-          this.main = data
-        }
-        this.initHot();
-      });
-    },
-
-    //撤回
-    undo() {
-      this.hot.undo();
-    },
-
-    //刷新
-    reset() {
-      this.getData();
-    },
-
-    //添加设备
-    addDevice() {
-      console.log("addDevice")
-    },
-
-    /**
-     * 表头文案处理函数
-     * @param arr header数组数据
-     *
-     * @return 处理好的文案
-     */
-    delHeader(arr) {
-      let data = arr.map(item => {
-        if (
-          item.InputMode == "A1" ||
-          item.InputMode == "A2" ||
-          item.InputMode == "B1" ||
-          item.InputMode == "C5" ||
-          item.InputMode == "D1" ||
-          item.InputMode == "D2" ||
-          item.InputMode == "X" ||
-          item.InputMode == "L" ||
-          item.InputMode == "L1" ||
-          item.InputMode == "L2" ||
-          item.InputMode == "F1" ||
-          item.InputMode == "F2"
-        ) {
-          if (item.unit == "") {
-            return item.InfoPointName;
-          } else {
-            return item.InfoPointName + "(" + item.unit + ")";
-          }
-        } else {
-          return undefined;
-        }
-      });
-      data = data.filter(item => item);
-      //   data.unshift("同时创建资产", "所属建筑楼层", "所属系统实例");
-      return data;
-    },
-
-    /**
-     * 表头数据处理函数
-     * @param arr header数组数据
-     *
-     * @return 处理好的数据格式
-     */
-    getType(arr) {
-      let data = arr.map(item => {
-        //二维码
-        if (item.infoPointCode == "EquipQRCode") {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-        //厂商选择
-        if (item.infoPointCode == "Brand" || item.infoPointCode == "Specification") {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-        if (item.infoPointCode == "SupplierContractID") {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-
-        if (item.infoPointCode == "InsuranceNum") {
-          //选择保单
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-
-        if (item.infoPointCode == "InsuranceFile" || item.infoPointCode == "Archive") {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-
-        if (
-          item.infoPointCode == "InstallLocation" ||
-          item.infoPointCode == "InstallPic" ||
-          item.infoPointCode == "InstallDrawing" ||
-          item.infoPointCode == "Nameplate" ||
-          item.infoPointCode == "Pic" ||
-          item.infoPointCode == "Drawing"
-        ) {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-
-        if (
-          item.infoPointCode == "Maintainer" ||
-          item.infoPointCode == "Supplier" ||
-          item.infoPointCode == "Insurer" ||
-          item.infoPointCode == "InsurerContactor"
-        ) {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-        if (item.InputMode == "D1") {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.customDropdownRenderer,
-            editor: "chosen",
-            chosenOptions: {
-              // multiple: true,//多选
-              data: item.DataSource || ""
-            }
-          };
-        } else if (item.InputMode == "A1" || item.InputMode == "A2") {
-          return {
-            data: "infos." + item.infoPointCode,
-            type: "numeric",
-            numericFormat: {
-              pattern: "0,0.00"
-              // culture: 'de-DE' // use this for EUR (German),
-              // more cultures available on http://numbrojs.com/languages.html
-            }
-          };
-        } else if (item.InputMode == "C5") {
-          return {
-            data: "infos." + item.infoPointCode,
-            type: "date",
-            dateFormat: "YYYY-MM-DD",
-            correctFormat: true
-          };
-        } else if (
-          item.InputMode == "B1" ||
-          item.InputMode == "L" ||
-          item.InputMode == "L1" ||
-          item.InputMode == "L2"
-        ) {
-          return {
-            data: "infos." + item.infoPointCode
-          };
-        } else if (
-          item.InputMode == "X" ||
-          item.InputMode == "F2"
-          // item.InputMode == "L1" ||
-          // item.InputMode == "L2"
-        ) {
-          return {
-            data: "infos." + item.infoPointCode,
-            readOnly: true
-          };
-        } else if (item.InputMode == "D2") {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.customDropdownRenderer,
-            editor: "chosen",
-            chosenOptions: {
-              multiple: true, //多选
-              data: item.DataSource.Content || ""
-            }
-          };
-        } else {
-          return undefined;
-        }
-
-      });
-      //   data.unshift(
-      //     {
-      //       type: "checkbox",
-      //       checkedTemplate: 1,
-      //       uncheckedTemplate: 0,
-      //       data: "Checked",
-      //       label: {
-      //         position: "after",
-      //       }
-      //     },
-      //     {
-      //       data: "flowBuild",
-      //       renderer: tools.customDropdownRenderer,
-      //       editor: "chosen",
-      //       chosenOptions: {
-      //         // multiple: true,//多选
-      //         // data: item.DataSource.Content || ""
-      //       }
-      //     },
-      //     {
-      //       data: "system",
-      //       renderer: tools.customDropdownRenderer,
-      //       editor: "chosen",
-      //       chosenOptions: {
-      //         // multiple: true,//多选
-      //         // data: item.DataSource.Content || ""
-      //       }
-      //     }
-      //   );
-      data = data.filter(item => item);
-      return data;
-    },
-
-    //初始化插件
-    initHot() {
-      var container = document.getElementById("myHandson");
-      let winHeight = document.documentElement.clientHeight;
-      this.hot = new Handsontable(container, {
-        data: this.main,
-        colHeaders: this.delHeader(this.headers), //表头文案
-        columns: this.getType(this.headers), //数据显示格式
-        filters: true,
-        height: winHeight - 100 - 50 - 60,
-        columnSorting: true, //添加排序
-        sortIndicator: true, //添加排序
-        renderAllRows: true,
-        autoColumnSize: true,
-        language: "zh-CN",
-        manualColumnResize: true,
-        manualColumnMove: true,
-        dropdownMenu: [
-          "filter_by_condition",
-          "filter_by_value",
-          "filter_action_bar"
-        ],
-        contextMenu: this.onlyRead ? false :{
-          items: {
-            remove_row: {
-              name: "删除该业务空间"
-            }
-          }
-        },
-        filters: true,
-        afterFilter: this.trimmedRows,
-        // 事件
-        afterChange: this.tdChange, //修改后
-        afterFilter: this.trimmedRows, //排序前
-        beforeRemoveRow: this.romoveFm, //右键删除
-        afterOnCellMouseDown: this.eventClick //鼠标点击
-      });
-      let pro = document.getElementById("hot-display-license-info");
-      if (!!pro) {
-        pro.parentNode.removeChild(pro);
-      }
-      this.isLoading = false;
-    },
-
-    tdChange() {
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //表格中的点击
-    eventClick(el, rowArr) {
-      console.log(rowArr)
-      //点击的是表头
-      if (rowArr.row < 0) {
-        return;
-      }
-      let filter = this.filtersArr;
-      //被筛选过后的数组
-      let trimmedArr = this.trimmedRows();
-      //是否启用了排序
-      let isSort = this.hot.getPlugin("columnSorting").isSorted();
-      if (trimmedArr.length && isSort) {
-        let sortArr = this.myHotArr.getPlugin("columnSorting").rowsMapper
-          .__arrayMap;
-        let infos = this.main[trimmedArr[sortArr[rowArr.row]]];
-        this.getInfors(infos, sortArr[rowArr.row]);
-      } else if (isSort) {
-        //排序后的数组
-        let sortArr = this.hot.getPlugin("columnSorting").rowsMapper.__arrayMap;
-        let infos = this.main[sortArr[rowArr.row]];
-        this.getInfors(infos, sortArr[rowArr.row]);
-      } else if (trimmedArr.length) {
-        let infos = this.main[trimmedArr[rowArr.row]];
-        this.getInfors(infos, trimmedArr[rowArr.row]);
-      } else {
-        let infos = this.main[rowArr.row];
-        this.getInfors(infos, rowArr);
-      }
-    },
-
-    getInfors(infos, row) {
-      //其他的开始判断
-      let val = this.hot.colToProp(row.col);
-      if (val == "infos.EquipQRCode") {
-        this.myDialog.qrcode = true;
-        this.$refs.qrcode.getCanvas(1111);
-      }
-
-      if (val == "infos.Brand" || val == "infos.Specification") {
-        this.myDialog.firm = true;
-      }
-
-      if (val == "infos.SupplierContractID") {
-        let falg = null
-        if (!!this.main[row.row].infos) {
-          if (!!this.main[row.row].infos) {
-            falg = this.main[row.row].infos.dpSupplierId
-          }
-        }
-        if (!!falg) {
-          this.id = falg
-          this.myDialog.supply = true;
-        } else {
-          this.$message("请先选择供应商")
-        }
-      }
-
-      if (val == "infos.InsuranceNum") {
-        //选择保单
-        this.myDialog.guarantee = true;
-      }
-
-      if (val == "infos.InsuranceFile" || val == "infos.Archive") {
-        this.filesArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? [this.main[row.row].infos[val.split(".")[1]]] : []) : []
-        this.myDialog.uploadFiles = true
-      }
-
-      if (
-        val == "infos.InstallLocation" ||
-        val == "infos.InstallPic" ||
-        val == "infos.InstallDrawing" ||
-        val == "infos.Nameplate" ||
-        val == "infos.Drawing"
-      ) {
-        if (val == "infos.Nameplate") {
-          this.imgsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? [this.main[row.row].infos[val.split(".")[1]].key] : []) : []
-        } else {
-          this.imgsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? [this.main[row.row].infos[val.split(".")[1]]] : []) : []
-        }
-        this.myDialog.uploadImgs = true
-      }
-
-      if (val == "infos.Pic") {
-        // console.log(this.main[row.row].infos[val.split(".")[1]], "this.main[row.row].infos[val.split")
-        this.picsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? this.main[row.row].infos[val.split(".")[1]] : []) : []
-        console.log(this.picsArr)
-        this.myDialog.pic = true
-      }
-
-      if (
-        val == "infos.Supplier"
-      ) {
-        this.myDialog.supplier = true;
-      }
-
-      if (val == "infos.Maintainer") {
-        this.myDialog.maintainer = true;
-      }
-
-      if (
-        val == "infos.Insurer" ||
-        val == "infos.InsurerContactor") {
-        this.myDialog.insurer = true;
-      }
-      this.row = row.row
-      this.messKey = val
-      console.log(val, row);
-    },
-
-    //获取被筛选掉的行号
-    trimmedRows() {
-      // var plugin = hot.getPlugin('trimRows').trimmedRows;//获取被筛选掉的行号
-      var plugin = this.hot.getPlugin("trimRows").trimmedRows;
-      let dataLength = this.main.length;
-      let dataArr = new Array();
-      for (let i = 0; i < dataLength; i++) {
-        dataArr.push(i);
-      }
-      if (plugin.length <= 0) {
-        dataArr = undefined;
-      } else {
-        dataArr = this.array_diff(dataArr, plugin);
-      }
-      return dataArr || [];
-      // var DataArray = new Array();
-
-      // for (var i = 0; i < plugin.length; i++) {
-      //     // 通过行号获取数据
-      //     DataArray.push(this.hot.getSourceDataAtRow(plugin[i]));
-      // }
-    },
-
-    //判断是否为空行
-    isEmptyRow(instance, row) {
-      var rowData = instance.countRows();
-      for (var i = 0, ilen = rowData.length; i < ilen; i++) {
-        if (rowData[i] !== null) {
-          return false;
-        }
-      }
-      return true;
-    },
-
-    //如果选择供应商之后
-    supplierChange(data) {
-      console.log(data, "供应商")
-      for (let key in data) {
-        this.utilToKey(key, "name", data, "Supplier")
-        this.utilToKey(key, "email", data, "SupplierEmail")
-        this.utilToKey(key, "website", data, "SupplierWeb")
-        this.utilToKey(key, "phone", data, "SupplierPhone")
-        this.utilToKey(key, "fox", data, "SupplierFax")
-        this.utilToKey(key, "man", data, "SupplierContactor")
-        this.utilToKey(key, "venderId", data, "dpSupplierId")
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //保险商变更
-    changeInsurer(data) {
-      console.log(data, "保险商")
-      for (let key in data) {
-        this.utilToKey(key, "name", data, "Insurer")
-        this.utilToKey(key, "email", data, "InsurerEmail")
-        this.utilToKey(key, "website", data, "InsurerWeb")
-        this.utilToKey(key, "phone", data, "InsurerFax")
-        this.utilToKey(key, "man", data, "InsurerContactor")
-        this.utilToKey(key, "venderId", data, "dpInsurerId")
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //维修商变更
-    changeMaintainer(data) {
-      for (let key in data) {
-        this.utilToKey(key, "name", data, "Maintainer")
-        this.utilToKey(key, "email", data, "MaintainerEmail")
-        this.utilToKey(key, "website", data, "MaintainerWeb")
-        this.utilToKey(key, "phone", data, "MaintainerPhone")
-        this.utilToKey(key, "fox", data, "MaintainerFax")
-        this.utilToKey(key, "man", data, "MaintainerContactor")
-        this.utilToKey(key, "venderId", data, "dpMaintainerId")
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    utilToKey(key, name, data, messName) {
-      if (key == name) {
-        this.setDataToMain(data[key], messName, this.row)
-      }
-    },
-
-    //上传文件弹窗触发事件
-    fileChange(keys) {
-      this.setDataToMain(keys[0], this.messKey.split(".")[1], this.row)
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //上传图片弹窗触发事件
-    imgChange(keys) {
-      this.setDataToMain(keys[0], this.messKey.split(".")[1], this.row)
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //设备图片弹窗改变事件
-    changePics(keys) {
-      this.setDataToMain(keys, this.messKey.split(".")[1], this.row)
-      tools.setItem(this.deviceType.code, this.main)
-      console.log("assets", keys)
-    },
-
-    //判断是否有值,有值赋值
-    setDataToMain(data, key, row) {
-      if (!!data && data != '--') {
-        if (!!this.main[row].infos) {
-          //铭牌照片特殊处理
-          if (key == 'Nameplate') {
-            this.main[row].infos[key] = {
-              "systemId": "dataPlatform",
-              "name": "铭牌照片",
-              "type": "image",
-              "key": data
-            }
-          } else {
-            this.main[row].infos[key] = data
-          }
-        } else {
-          this.main[row].infos = {}
-          if (key == 'Nameplate') {
-            this.main[row].infos[key] = {
-              "systemId": "dataPlatform",
-              "name": "铭牌照片",
-              "type": "image",
-              "key": data
-            }
-          } else {
-            this.main[row].infos[key] = data
-          }
-        }
-      } else {
-        this.main[row].infos[key] = ''
-      }
-    }
-  },
-  watch: {
-    dialog: {
-      deep: true,
-      handler(newName, oldName) {
-        // this.getData()
-        console.log(this.dialog)
-        if (this.dialog.addDevice) {
-          this.getData()
-        }
-      },
-    }
-  }
-};
-</script>
-<style lang="less" scoped>
-#addDevice {
-  overflow: hidden;
-}
-</style>

+ 6 - 26
src/components/business_space/dialogs/list/insurerDialog.vue

@@ -26,10 +26,10 @@
               </template>
             </el-table-column>
             <el-table-column header-align='center' prop="website" label="网址"></el-table-column>
-            <el-table-column header-align='center' prop="man" label="联系人"></el-table-column>
-            <el-table-column header-align='center' prop="phone" label="联系电话"></el-table-column>
-            <el-table-column header-align='center' prop="faxes" label="传真"></el-table-column>
-            <el-table-column header-align='center' prop="email" label="电子邮件"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].name" label="联系人"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].phone" label="联系电话"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].fax" label="传真"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].email" label="电子邮件"></el-table-column>
           </el-table>
         </el-radio-group>
         <div class="right" style="background: #fff;">
@@ -111,29 +111,9 @@ export default {
       }
       getLib({ "type": ["insurance"] }).then(res => {
         if (res.data.result == "success") {
-          let data = res.data.content.insurance.map(item => {
-            if (item.contacts && item.contacts.length) {
-              item.contacts.map(child => {
-                if (child.projectId == this.projectId) {
-                  item.phone = child.phone
-                  item.man = child.name
-                  item.fox = child.fox
-                  item.email = child.email
-                }
-                return child
-              })
-            }
-            if (!item.man) {
-              item.man = "--"
-              item.phone = "--"
-              item.fox = "--"
-              item.email = "--"
-            }
-            return item
-          })
-          this.allData = tools.deepCopy(data)
+          this.allData = tools.deepCopy(res.data.content.insurance)
           this.tableData = this.pagination(this.page.currentPage, this.page.size, this.allData)
-          this.page.total = data.length
+          this.page.total = this.allData.length
         } else {
           this.$message.error("请求失败:" + res.data.resultMsg)
         }

+ 6 - 26
src/components/business_space/dialogs/list/maintainerDialog.vue

@@ -26,10 +26,10 @@
               </template>
             </el-table-column>
             <el-table-column header-align='center' prop="website" label="网址"></el-table-column>
-            <el-table-column header-align='center' prop="man" label="联系人"></el-table-column>
-            <el-table-column header-align='center' prop="phone" label="联系电话"></el-table-column>
-            <el-table-column header-align='center' prop="faxes" label="传真"></el-table-column>
-            <el-table-column header-align='center' prop="email" label="电子邮件"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].name" label="联系人"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].phone" label="联系电话"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].fax" label="传真"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].email" label="电子邮件"></el-table-column>
           </el-table>
         </el-radio-group>
         <div class="right" style="background: #fff;">
@@ -109,29 +109,9 @@ export default {
       }
       getLib({ "type": ["maintenance"] }).then(res => {
         if (res.data.result == "success") {
-          let data = res.data.content.maintenance.map(item => {
-            if (item.contacts && item.contacts.length) {
-              item.contacts.map(child => {
-                if (child.projectId == this.projectId) {
-                  item.phone = child.phone
-                  item.man = child.name
-                  item.fox = child.fox
-                  item.email = child.email
-                }
-                return child
-              })
-            }
-            if (!item.man) {
-              item.man = "--"
-              item.phone = "--"
-              item.fox = "--"
-              item.email = "--"
-            }
-            return item
-          })
-          this.allData = tools.deepCopy(data)
+          this.allData = tools.deepCopy(res.data.content.maintenance)
           this.tableData = this.pagination(this.page.currentPage, this.page.size, this.allData)
-          this.page.total = data.length
+          this.page.total = this.allData.length
         } else {
           this.$message.error("请求失败:" + res.data.resultMsg)
         }

+ 6 - 26
src/components/business_space/dialogs/list/supplierDialog.vue

@@ -26,10 +26,10 @@
               </template>
             </el-table-column>
             <el-table-column header-align='center' prop="website" label="网址"></el-table-column>
-            <el-table-column header-align='center' prop="man" label="联系人"></el-table-column>
-            <el-table-column header-align='center' prop="phone" label="联系电话"></el-table-column>
-            <el-table-column header-align='center' prop="faxes" label="传真"></el-table-column>
-            <el-table-column header-align='center' prop="email" label="电子邮件"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].name" label="联系人"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].phone" label="联系电话"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].fax" label="传真"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].email" label="电子邮件"></el-table-column>
           </el-table>
         </el-radio-group>
         <div class="right" style="background: #fff;">
@@ -109,29 +109,9 @@ export default {
       }
       getLib({ "type": ["supplier"] }).then(res => {
         if (res.data.result == "success") {
-          let data = res.data.content.supplier.map(item => {
-            if (item.contacts && item.contacts.length) {
-              item.contacts.map(child => {
-                if (child.projectId == this.projectId) {
-                  item.phone = child.phone
-                  item.man = child.name
-                  item.fox = child.fox
-                  item.email = child.email
-                }
-                return child
-              })
-            }
-            if (!item.man) {
-              item.man = "--"
-              item.phone = "--"
-              item.fox = "--"
-              item.email = "--"
-            }
-            return item
-          })
-          this.allData = tools.deepCopy(data)
+          this.allData = tools.deepCopy(res.data.content.supplier)
           this.tableData = this.pagination(this.page.currentPage, this.page.size, this.allData)
-          this.page.total = data.length
+          this.page.total = this.allData.length
         } else {
           this.$message.error("请求失败:" + res.data.resultMsg)
         }

+ 2 - 2
src/components/business_space/lib/uploadFiles.vue

@@ -88,8 +88,8 @@ export default {
       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.href = `/image-service/common/file_get/${item.key}?systemId=dataPlatform`;
+          a.download = `${item.name}`;
           a.click();
           document.body.removeChild(a);
         } else {

+ 1 - 1
src/components/business_space/newAddDialogs/addEquipDialog.vue

@@ -106,7 +106,7 @@ export default {
     // 获取项目下建筑
     getBuilding() {
       let pa = {
-        cascade: [{ name: 'floor', orders: 'floorSequenceId desc' }],
+        cascade: [{ name: 'floor', orders: 'floorSequenceID desc' }],
         orders: "localName asc",
       }
       buildingQuery(pa, res => {

+ 13 - 13
src/components/business_space/newAddDialogs/roomInFloorDialog.vue

@@ -5,15 +5,15 @@
         <el-table-column label="业务空间名称" show-overflow-tooltip min-width="100">
           <template slot-scope="scope">
             <div>
-              {{scope.row.RoomLocalName||scope.row.RoomName||''}}
+              {{scope.row.localName||scope.row.name||''}}
             </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 v-for="(t,i) in scope.row.floorList" :key="i" class="muti">
+                {{t.building.localName||t.building.name}}
               </div>
             </div>
           </template>
@@ -21,8 +21,8 @@
         <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 v-for="t in scope.row.floorList" :key="t.id" class="muti">
+                {{t.localName||t.name}}
               </div>
             </div>
           </template>
@@ -30,7 +30,7 @@
         <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">
+              <div v-for="t in scope.row.floorList" :key="t.id" class="muti">
                 <el-radio v-model="scope.row.selected" :label="t">{{''}}</el-radio>
               </div>
             </div>
@@ -83,9 +83,9 @@ export default {
       this.tableData.forEach(t => {
         if (t.selected) {
           arr.push({
-            spaceId: t.RoomID,
-            id: t.selected.FloorID,
-            type: t.ObjectType
+            spaceId: t.id,
+            id: t.selected.floorId,
+            type: t.classCode
           })
         }
       })
@@ -102,13 +102,13 @@ export default {
     // 获取表格数据
     getTableData() {
       let pa = {
-        Cascade: [
-          { Name: "floorlList", Cascade: [{ Name: 'building' }] }
+        cascade: [
+          { Name: "floorList", cascade: [{ name: 'building' }] }
         ],
-        PageSize: 1000
+        pageSize: 1000
       }
       getSpaceBdFlData(pa, res => {
-        this.tableData = res.Content;
+        this.tableData = res.content;
       })
     }
   }

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

@@ -4,7 +4,7 @@
     <el-input :placeholder="`请输入业务空间名称`" v-model="roomName"></el-input>
     <span slot="footer" class="dialog-footer">
       <el-button size="small" @click="dialogVisible=false">取 消</el-button>
-      <el-button size="small" type="primary" @click="confirm">确 定</el-button>
+      <el-button size="small" type="primary" @click="confirm" :disabled="confirmDisable">确 定</el-button>
     </span>
   </el-dialog>
 </template>
@@ -16,6 +16,7 @@ export default {
       title: '提示',
       dialogVisible: false,
       roomName: '',
+      confirmDisable: true
     };
   },
   methods: {
@@ -23,6 +24,7 @@ export default {
     showDialog(val) {
       this.roomName = val;
       this.dialogVisible = true;
+      this.confirmDisable = false;
     },
     // 确认
     confirm() {
@@ -30,6 +32,7 @@ export default {
         this.$message.warning("请填写空间名称");
         return
       }
+      this.confirmDisable = true
       this.$emit('createRoom', this.roomName);
       this.dialogVisible = false;
     }

+ 40 - 33
src/components/business_space/newGraphy/graphy.vue

@@ -1,7 +1,7 @@
 <template>
   <div id="graphy" ref="graphy" v-loading="canvasLoading">
     <div v-show="!FloorMap">
-        <!-- 平面图其他分区 -->
+      <!-- 平面图其他分区 -->
       <!-- <div style="margin-right:10px;width: 100%;margin-bottom: 10px" v-if="showOtherFlag">
         <el-button type="primary" @click="addZoneBtn">添加分区</el-button>
         <el-select v-model="OtherValue" placeholder="请选择分区类型" @change="changeOtherZone">
@@ -29,7 +29,7 @@
         <div>
           <el-autocomplete popper-class="my-autocomplete" v-model="search" :fetch-suggestions="querySearch" placeholder="输入平面图中已有的业务空间名称进行查找"
             width="180px" @select="handleSelect">
-            <i class="el-icon-search el-input__icon" slot="suffix" @click="handleSelect"></i>
+            <i class="el-icon-search el-input__icon" slot="suffix"></i>
             <template slot-scope="{ item }">
               <div class="name" style="position: relative;padding-right:40px;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;"
                 :title="item.data.RoomLocalName">
@@ -71,8 +71,8 @@
             <el-button type="primary" v-show='curZoneItem.isInfected' @click="confirmAndSave">保存并确认业务空间</el-button>
           </div>
           <!-- 批量创建所选业务空间 -->
-          <div v-show="type==5">
-            <el-button type="primary" @click="groupCreateZone">批量创建所选业务空间</el-button>
+          <div v-if="type==5">
+            <el-button type="primary" @click.prevent.once="groupCreateZone">批量创建所选业务空间</el-button>
             <el-button plain @click="cancelGraphy">取 消</el-button>
           </div>
           <div style="position: absolute;right: 10px;">
@@ -379,7 +379,7 @@ export default {
       that.canvasLoading = false;
       if (res == 'error') {
         this.FloorMap = '';
-        this.$message.warning('数据解析异常');
+        console.log('数据解析异常');
         return;
       }
       that.view.scene = that.scene;
@@ -435,7 +435,6 @@ export default {
           })
           // 绘制业务空间
           let tempArr = this.BSPRelaISPList.map((t, i) => {
-            console.log(t);
             return {
               RoomLocalName: t.localName || t.name,
               OutLine: t.outline,
@@ -444,11 +443,17 @@ export default {
               Infected: t.state
             }
           }).filter(item => item)
-          this.scene.removeAllZone();
-          this.scene.addZoneList(tempArr);
-          this.scene.click(this, this.canvasClick);
-          this.zoneList = this.scene.zoneList;
-          this.view._needDraw = true;
+          try {
+            this.scene.removeAllZone();
+            this.scene.addZoneList(tempArr);
+            this.scene.click(this, this.canvasClick);
+            this.zoneList = this.scene.zoneList;
+            this.view._needDraw = true;
+            this.fit();
+          } catch (err) {
+            console.log(err, '------------');
+            console.log(this)
+          }
           this.canvasLoading = false;
         }
       })
@@ -531,6 +536,8 @@ export default {
         this.scene.isSpaceSelectable = true;
         // 设置业务空间不可选
         this.scene.isZoneSelectable = false;
+        // 刷新
+        this.view.update()
       }
     },
     // 根据未关联元空间批量创建业务空间
@@ -674,8 +681,8 @@ export default {
         console.log(err)
         let selectSpaces = this.scene.getSelectedSpaces();
         selectSpaces.map(t => {
-          zoneObj.outline.push(t.data.outLine);
-          let key = t.data.sourceId;
+          zoneObj.outline.push(t.data.OutLine);
+          let key = t.data.SourceId;
           let curISP = this.sourceIdToISP[key];
           if (curISP) {
             IspaceIdList.push(curISP.id);
@@ -768,9 +775,10 @@ export default {
       } catch (err) {
         console.log(err);
         let selectSpaces = this.scene.getSelectedSpaces();
+        console.log(selectSpaces);
         selectSpaces.map(t => {
-          zoneObj.outline.push(t.data.outLine);
-          let key = t.data.sourceId;
+          zoneObj.outline.push(t.data.OutLine);
+          let key = t.data.SourceId;
           let curISP = this.sourceIdToISP[key];
           if (curISP) {
             curISP && IspaceIdList.push(curISP.id);
@@ -818,7 +826,6 @@ export default {
         isMyTab: 1,
         buildFloorSelectd: this.buildFloor
       }
-
       this.$router.push({
         path: "/ledger/spaceDetail",
         query: query
@@ -849,7 +856,6 @@ export default {
       }
       let pa = {
         content: [space],
-        projection: ['state']
       }
       zoneUpdate(pa, res => {
         this.curZoneItem.isInfected = false;
@@ -875,13 +881,13 @@ export default {
           IspaceIdList.push(this.BIMIDToSID[t.data.SourceId]);
         }
         // 2020-12-20 演示用 -start
-        if (this.sourceIdToISP[t.data.sourceId] && this.sourceIdToISP[t.data.sourceId].infos) {
+        if (this.sourceIdToISP[t.data.SourceId] && this.sourceIdToISP[t.data.SourceId].infos) {
           zoneObj.infos = {};
-          if (this.sourceIdToISP[t.data.sourceId].infos.roomLocalFuncTypeID) {
-            zoneObj.infos.roomLocalFuncTypeID = this.sourceIdToISP[t.data.sourceId].infos.roomLocalFuncTypeID
+          if (this.sourceIdToISP[t.data.SourceId].infos.roomLocalFuncTypeID) {
+            zoneObj.infos.roomLocalFuncTypeID = this.sourceIdToISP[t.data.SourceId].infos.roomLocalFuncTypeID
           }
-          if (this.sourceIdToISP[t.data.sourceId].infos.roomLocalFuncTypeName) {
-            zoneObj.infos.roomLocalFuncTypeName = this.sourceIdToISP[t.data.sourceId].infos.roomLocalFuncTypeName
+          if (this.sourceIdToISP[t.data.SourceId].infos.roomLocalFuncTypeName) {
+            zoneObj.infos.roomLocalFuncTypeName = this.sourceIdToISP[t.data.SourceId].infos.roomLocalFuncTypeName
           }
         }
         // 2020-12-20 演示用 -end
@@ -995,7 +1001,6 @@ export default {
         }
       } catch (err) {
         console.log(err)
-        let createSpaces = [];
         // 如果有划分,求交集
         if (this.scene.cutItem || this.scene.sceneMark) {
           let outlines = this.scene.getIntersectInSpace();
@@ -1031,23 +1036,23 @@ export default {
               }
             }
             return {
-              ispaceId: this.BIMIDToSID[t.data.sourceId],
-              localName: this.BIMIDToSIName[t.data.sourceId] || '',
+              ispaceId: this.BIMIDToSID[t.data.SourceId],
+              localName: this.BIMIDToSIName[t.data.SourceId] || '',
               outline: line,
               buildingId: this.buildFloor[0],
               floorId: this.buildFloor[1],
               height: this.spaceHeight,
               // 2020-12-20 演示用 -start
               infos: {
-                roomLocalFuncTypeID: this.sourceIdToISP[t.data.sourceId].infos ? this.sourceIdToISP[t.data.sourceId].infos.roomLocalFuncTypeID || '' : '',
-                roomLocalFuncTypeName: this.sourceIdToISP[t.data.sourceId].infos ? this.sourceIdToISP[t.data.sourceId].infos.roomLocalFuncTypeName || '' : ''
+                roomLocalFuncTypeID: this.sourceIdToISP[t.data.SourceId].infos ? this.sourceIdToISP[t.data.SourceId].infos.roomLocalFuncTypeID || '' : '',
+                roomLocalFuncTypeName: this.sourceIdToISP[t.data.SourceId].infos ? this.sourceIdToISP[t.data.SourceId].infos.roomLocalFuncTypeName || '' : ''
               }
               // 2020-12-20 演示用 -end
             }
           }).filter(item => item)
         } else {
           createSpaces = arr.map(t => {
-            let line = t.data.outLine;
+            let line = t.data.OutLine;
             if (!line || !line.length) {
               return undefined
             } else {
@@ -1063,16 +1068,16 @@ export default {
               }
             }
             return {
-              ispaceId: this.BIMIDToSID[t.data.sourceId],
-              localName: this.BIMIDToSIName[t.data.sourceId] || '',
+              ispaceId: this.BIMIDToSID[t.data.SourceId],
+              localName: this.BIMIDToSIName[t.data.SourceId] || '',
               outline: [line],
               buildingId: this.buildFloor[0],
               floorId: this.buildFloor[1],
               height: this.spaceHeight,
               // 2020-12-20 演示用 -start
               infos: {
-                roomLocalFuncTypeID: this.sourceIdToISP[t.data.sourceId].infos ? this.sourceIdToISP[t.data.sourceId].infos.roomLocalFuncTypeID || '' : '',
-                roomLocalFuncTypeName: this.sourceIdToISP[t.data.sourceId].infos ? this.sourceIdToISP[t.data.sourceId].infos.roomLocalFuncTypeName || '' : ''
+                roomLocalFuncTypeID: this.sourceIdToISP[t.data.SourceId].infos ? this.sourceIdToISP[t.data.SourceId].infos.roomLocalFuncTypeID || '' : '',
+                roomLocalFuncTypeName: this.sourceIdToISP[t.data.SourceId].infos ? this.sourceIdToISP[t.data.SourceId].infos.roomLocalFuncTypeName || '' : ''
               }
               // 2020-12-20 演示用 -end
             }
@@ -1175,7 +1180,9 @@ export default {
       zoneObj.floorId = this.buildFloor[1];
       let pa = {
         content: [zoneObj],
-        projection: ['bimLocation', 'classCode', 'outline', 'height', 'buildingId', 'floorId']
+      }
+      if (!zoneObj.outline) {
+        pa.nullItems = ['outline']
       }
       zoneUpdate(pa, res => {
         zoneUpdateOutline(pa, res => { console.log(res) })

+ 1 - 1
src/components/business_space/newGraphy/unRelateBSP.vue

@@ -112,7 +112,7 @@ export default {
     // 获取项目下建筑
     getBuilding() {
       let pa = {
-        cascade: [{ name: 'floor', orders: 'floorSequenceId desc' }],
+        cascade: [{ name: 'floor', orders: 'floorSequenceID desc' }],
         orders: "localName asc",
       }
       buildingQuery(pa, res => {

+ 224 - 215
src/components/data_admin/buildTask/detail/assetsDetail.vue

@@ -1,240 +1,249 @@
 <template>
-  <div class="detail-box">
-    <el-scrollbar style="height:100%;">
-      <div class="attribute-detail detail-item">
-        <el-form :model="detail" label-width="150px">
-          <el-form-item label="资产基本信息"></el-form-item>
-          <el-form-item label="任务创建时间:">{{ detail.createTime || '--' }}</el-form-item>
-          <el-form-item label="任务当前状态:">{{ detail.taskState || '--' }}</el-form-item>
-          <el-form-item label="任务执行方案:">
-            {{detail.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.localName || '--' }}</el-form-item>
-          <el-form-item label="资产本地编码:">{{ detail.equipId || '--' }}</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>
-      </div>
-      <div class="implement-detail detail-item" v-if="detail.taskState == '未找到'">
-        <el-form :model="detail" label-width="150px">
-          <el-form-item label="执行任务人:">{{ detail.workerName || '--' }}</el-form-item>
-          <el-form-item label="执行时间:">{{ detail.processTime || '--' }}</el-form-item>
-          <el-form-item label="未找到对象信息"></el-form-item>
-          <el-form-item label="资产名称:">{{ detail.localName || detail.equipName || '--' }}</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="detail-box">
+        <el-scrollbar style="height: 100%">
+            <div class="attribute-detail detail-item">
+                <el-form :model="detail" label-width="150px">
+                    <el-form-item label="资产基本信息"></el-form-item>
+                    <el-form-item label="任务创建时间:">{{ detail.createTime || "--" }}</el-form-item>
+                    <el-form-item label="任务当前状态:">{{ detail.taskState || "--" }}</el-form-item>
+                    <el-form-item label="任务执行方案:">
+                        {{ detail.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.localName || "--" }}</el-form-item>
+                    <el-form-item label="资产本地编码:">{{ detail.localId || "--" }}</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>
             </div>
-          </el-form-item>
-          <el-form-item label="资产照片:" v-show="imgList && imgList.length">
-            <div class="img-item">
-              <div class="demo-image__preview">
-                <el-image style="width:100%;" v-for="item in imgList"
-                 :key="item.key" :title="item.name"
-                 @click="nowUrl = item.key"
-                 :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.key}&width=400`"
-                 :preview-src-list="srcList">
-                </el-image>
-              </div>
+            <div 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="资产名称:">{{ detail.localName || detail.equipName || "--" }}</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>
+                    </el-form-item>
+                    <el-form-item label="资产照片:" v-show="imgList && imgList.length">
+                        <div class="img-item">
+                            <div class="demo-image__preview">
+                                <el-image
+                                    style="width: 100%"
+                                    v-for="item in imgList"
+                                    :key="item.key"
+                                    :title="item.name"
+                                    @click="nowUrl = item.key"
+                                    :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.key}&width=400`"
+                                    :preview-src-list="srcList"
+                                >
+                                </el-image>
+                            </div>
+                        </div>
+                    </el-form-item>
+                    <el-form-item label="现场视频:" v-show="videoList && videoList.length">
+                        <video controls style="width: 100%" v-for="item in videoList" :key="item.key" :title="item.name">
+                            <source :src="`/image-service/common/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>
-          </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/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" v-if="detail.taskState === '未找到'">
-        <el-form>
-          <el-form-item label="操作信息:"></el-form-item>
-          <div class="block">
-            <el-timeline>
-              <el-timeline-item
-                  placement="top"
-                  v-for="(item,index) in arr"
-                  :key="index"
-                  :timestamp="item.timestamp"
-              >
-                <el-card>
-                  <small>{{item.content}}</small>
-                  <p>{{item.title}}</p>
-                  <img
-                      v-for="isImg in item.imgs"
-                      :key="isImg.key"
-                      :src="`/image-service/common/image_get?systemId=dataPlatform&key=${isImg.key}`">
+            <div class="operation-detail detail-item" v-if="detail.taskState === '未找到'">
+                <el-form>
+                    <el-form-item label="操作信息:"></el-form-item>
+                    <div class="block">
+                        <el-timeline>
+                            <el-timeline-item placement="top" v-for="(item, index) in arr" :key="index" :timestamp="item.timestamp">
+                                <el-card>
+                                    <small>{{ item.content }}</small>
+                                    <p>{{ item.title }}</p>
+                                    <img
+                                        v-for="isImg in item.imgs"
+                                        :key="isImg.key"
+                                        :src="`/image-service/common/image_get?systemId=dataPlatform&key=${isImg.key}`"
+                                    />
 
-                  <video controls style="width:100%;" v-for="v in videoList" :key="index"
-                         :title="v.name">
-                    <source
-                        :src="`/image-service/common/file_get?systemId=dataPlatform&key=${v.key}`"
-                        type="video/mp4">
-                    您的浏览器不支持 HTML5 video ,暂无法播放。
-                  </video>
-                </el-card>
-              </el-timeline-item>
-            </el-timeline>
-          </div>
-        </el-form>
-      </div>
-    </el-scrollbar>
-    <el-dialog title="全景图" :visible.sync="dialogVisible" width="70%" append-to-body>
-      一张图
-    </el-dialog>
-  </div>
+                                    <video controls style="width: 100%" v-for="(v, i) in item.videoList" :key="`video_${i}`" :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>
+                    </div>
+                </el-form>
+            </div>
+        </el-scrollbar>
+        <el-dialog title="全景图" :visible.sync="dialogVisible" width="70%" append-to-body> 一张图 </el-dialog>
+    </div>
 </template>
 
 <script>
 import { mapGetters } from "vuex"
 
 export default {
-  components: {
+    components: {},
+    computed: {
+        ...mapGetters("layout", ["projectId"]),
+        panoramaList() {
+            if (this.detail && this.detail.taskPicList && this.detail.taskPicList.length) {
+                return this.detail.taskPicList.filter(item => {
+                    return item.type == 'panorama'
+                })
+            } else {
+                return []
+            }
+        },
+        imgList() {
+            if (this.detail && this.detail.taskPicList && this.detail.taskPicList.length) {
+                return this.detail.taskPicList.filter(item => {
+                    return item.type == 'image'
+                })
+            } else {
+                return []
+            }
+        },
+        videoList() {
+            if (this.detail && this.detail.taskPicList && this.detail.taskPicList.length) {
+                return this.detail.taskPicList.filter(item => {
+                    return item.type == 'video'
+                })
+            } else {
+                return []
+            }
+        },
+        srcList() {
+            let nowIndex = this.imgList.findIndex(item => { return item.key == this.nowUrl })
+            let index = nowIndex >= 1 ? nowIndex : 0;
+            let tempArr1 = this.imgList.slice(0, index);
+            let tempArr2 = this.imgList.slice(index, this.imgList.length);
 
-  },
-  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(){
-      if(this.detail && this.detail.taskPicList && this.detail.taskPicList.length){
-        return this.detail.taskPicList.filter(item => {
-          return item.type == 'panorama'
-        })
-      } else {
-        return []
-      }
+            let res = tempArr2.concat(tempArr1).map(item => {
+                return `/image-service/common/image_get?systemId=dataPlatform&key=${item.key}`
+            });
+            return res;
+        },
+        arr() {
+            let { confirmTime, positivePhotoTime, qrCodeTime, nameplateTime, sidePhotoTime, videoTime, equipProblemTime, equipProblem, taskPicList, processTime, regionPhotoTime } = this.detail;
+            let arr = []
+            processTime && arr.push({
+                timestamp: processTime,
+                time: new Date(processTime).getTime(),
+                content: '执行任务',
+            })
+            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('设备左侧照片' || '设备右侧照片'))
+            })
+            regionPhotoTime && arr.push({
+                timestamp: regionPhotoTime,
+                time: new Date(regionPhotoTime).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: '已确认的设备信息'
+            })
+            return arr.map(i => ({ ...i })).sort((a, b) => a.time - b.time)
+        },
     },
-    imgList(){
-      if(this.detail && this.detail.taskPicList && this.detail.taskPicList.length){
-        return this.detail.taskPicList.filter(item => {
-          return item.type == 'image'
-        })
-      } else {
-        return []
-      }
+    props: {
+        detail: Object
     },
-    videoList(){
-      if(this.detail && this.detail.taskPicList && this.detail.taskPicList.length){
-        return this.detail.taskPicList.filter(item => {
-          return item.type == 'video'
-        })
-      } else {
-        return []
-      }
+    data() {
+        return {
+            dialogVisible: false,//全景图弹出框
+            nowUrl: '',//当前正在显示的图
+        };
     },
-    srcList(){
-      let nowIndex = this.imgList.findIndex(item => {return item.key == this.nowUrl})
-      let index = nowIndex >= 1 ? nowIndex : 0;
-      let tempArr1 = this.imgList.slice(0, index);
-      let tempArr2 = this.imgList.slice(index, this.imgList.length);
-
-      let res = tempArr2.concat(tempArr1).map(item => {
-        return `/image-service/common/image_get?systemId=dataPlatform&key=${item.key}`
-      });
-      return res;
-    }
-  },
-  props: {
-    detail: Object
-  },
-  data() {
-    return {
-      dialogVisible: false,//全景图弹出框
-      nowUrl: '',//当前正在显示的图
-      arr: [],
-    };
-  },
-  methods: {
+    methods: {
 
-  },
-  watch: {
-    'detail.id'() {
-      console.log(this.detail)
+    },
+    watch: {
+        'detail.id'() {
+            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;
-  }
+    width: 100%;
+    height: 100%;
+    box-sizing: border-box;
+    /deep/ .el-scrollbar__wrap {
+        overflow-x: hidden;
+    }
+    /deep/ .el-icon-circle-close {
+        color: white;
+    }
 
-  /deep/ .el-form-item__content {
-    text-overflow: ellipsis;
-    overflow: hidden;
-  }
+    /deep/ .el-form-item__content {
+        text-overflow: ellipsis;
+        overflow: hidden;
+    }
 
-  .detail-item {
-    width: calc(100% - 30px);
-    margin: 15px 15px 10px;
-    padding: 10px;
-    box-sizing: border-box;
-    border-left: 1px solid #eee;
-    box-shadow: 0px 1px 5px 0px rgba(59, 66, 84, 0.15);
-  }
+    .detail-item {
+        width: calc(100% - 30px);
+        margin: 15px 15px 10px;
+        padding: 10px;
+        box-sizing: border-box;
+        border-left: 1px solid #eee;
+        box-shadow: 0px 1px 5px 0px rgba(59, 66, 84, 0.15);
+    }
 
-  .img-item {
-    position: relative;
-    cursor: pointer;
-  }
+    .img-item {
+        position: relative;
+        cursor: pointer;
+    }
 }
 </style>

+ 273 - 276
src/components/data_admin/buildTask/detail/deviceDetail.vue

@@ -1,117 +1,104 @@
 <template>
-  <div class="detail-box">
-    <el-scrollbar style="height:100%;">
-      <div class="attribute-detail detail-item">
-        <el-form :model="detail" label-width="150px">
-          <el-form-item label="设备基本信息"></el-form-item>
-          <el-form-item label="任务创建时间:">{{ detail.createTime || '--' }}</el-form-item>
-          <el-form-item label="任务当前状态:">{{ detail.taskState || '--' }}</el-form-item>
-          <el-form-item label="任务执行方案:">
-            {{ detail.schemeId ? detail.schemeId == 1 ? '极简' : '标准' : '--' }}
-          </el-form-item>
-          <el-form-item label="设备类:">{{
-              detail.equipFamily ? detail.equipFamily.equipName ? detail.equipFamily.equipName : '--' : '--'
-            }}
-          </el-form-item>
-          <el-form-item label="全局名称:">{{ detail.equipName || '--' }}</el-form-item>
-          <el-form-item label="设备本地名称:">{{ detail.localName || '--' }}</el-form-item>
-          <el-form-item label="设备本地编码:">{{ detail.equipId || '--' }}</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="包含部件:">
-            {{ Name ? Name : '-' }}{{ Count ? ':' + Count + '个' : '-' }}
-          </el-form-item>
-        </el-form>
-      </div>
-      <div class="implement-detail detail-item" v-if="detail.taskState === '未找到'">
-        <el-form :model="detail" label-width="150px">
-          <el-form-item label="执行任务人:">{{ detail.workerName || '--' }}</el-form-item>
-          <el-form-item label="执行时间:">{{ detail.processTime || '--' }}</el-form-item>
-          <el-form-item label="未找到对象信息"></el-form-item>
-          <el-form-item label="设备信息:" v-if="!detail.isComponent">{{
-              detail.localName || 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.localName || item.equipName }}
-              </p>
+    <div class="detail-box">
+        <el-scrollbar style="height: 100%">
+            <div class="attribute-detail detail-item">
+                <el-form :model="detail" label-width="150px">
+                    <el-form-item label="设备基本信息"></el-form-item>
+                    <el-form-item label="任务创建时间:">{{ detail.createTime || "--" }}</el-form-item>
+                    <el-form-item label="任务当前状态:">{{ detail.taskState || "--" }}</el-form-item>
+                    <el-form-item label="任务执行方案:">
+                        {{ detail.schemeId ? (detail.schemeId == 1 ? "极简" : "标准") : "--" }}
+                    </el-form-item>
+                    <el-form-item label="设备类:"
+                        >{{ detail.equipCategory ? (detail.equipCategory.name ? detail.equipCategory.name : "--") : "--" }}
+                    </el-form-item>
+                    <el-form-item label="全局名称:">{{ detail.equipName || "--" }}</el-form-item>
+                    <el-form-item label="设备本地名称:">{{ detail.localName || "--" }}</el-form-item>
+                    <el-form-item label="设备本地编码:">{{ detail.localId || "--" }}</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="包含部件:"> {{ Name ? Name : "-" }}{{ Count ? ":" + Count + "个" : "-" }} </el-form-item>
+                </el-form>
             </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="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.localName || detail.name || "--" }} </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.localName || 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>
+                    </el-form-item>
+                    <el-form-item label="设备照片:" v-show="imgList && imgList.length">
+                        <div class="img-item">
+                            <div class="demo-image__preview">
+                                <el-image
+                                    style="width: 100%"
+                                    v-for="item in imgList"
+                                    :key="item.key"
+                                    :title="item.name"
+                                    @click="nowUrl = item.key"
+                                    :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.key}&width=400`"
+                                    :preview-src-list="srcList"
+                                >
+                                </el-image>
+                            </div>
+                        </div>
+                    </el-form-item>
+                    <el-form-item label="现场视频:" v-show="videoList && videoList.length">
+                        <video controls style="width: 100%" v-for="item in videoList" :key="item.key" :title="item.name">
+                            <source :src="`/image-service/common/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>
-          </el-form-item>
-          <el-form-item label="设备照片:" v-show="imgList && imgList.length">
-            <div class="img-item">
-              <div class="demo-image__preview">
-                <el-image style="width:100%;" v-for="item in imgList"
-                          :key="item.key" :title="item.name"
-                          @click="nowUrl = item.key"
-                          :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.key}&width=400`"
-                          :preview-src-list="srcList">
-                </el-image>
-              </div>
-            </div>
-          </el-form-item>
-          <el-form-item label="现场视频:" v-show="videoList && videoList.length">
-            <video controls style="width:100%;" v-for="item in videoList" :key="item.key"
-                   :title="item.name">
-              <source :src="`/image-service/common/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" v-if="detail.taskState === '未找到'">
-        <el-form>
-          <el-form-item label="操作信息:"></el-form-item>
-          <div class="block">
-            <el-timeline>
-              <el-timeline-item
-                placement="top"
-                v-for="(item,index) in arr"
-                :key="index"
-                :timestamp="item.timestamp"
-              >
-                <el-card>
-                  <small>{{ item.content }}</small>
-                  <p>{{ item.title }}</p>
-                  <img
-                    v-for="isImg in item.imgs"
-                    :key="isImg.key"
-                    :src="`/image-service/common/image_get?systemId=dataPlatform&key=${isImg.key}`">
+            <div class="operation-detail detail-item" v-if="detail.taskState === '未找到'">
+                <el-form>
+                    <el-form-item label="操作信息:"></el-form-item>
+                    <div class="block">
+                        <el-timeline>
+                            <el-timeline-item placement="top" v-for="(item, index) in arr" :key="index" :timestamp="item.timestamp">
+                                <el-card>
+                                    <small>{{ item.content }}</small>
+                                    <p>{{ item.title }}</p>
+                                    <img
+                                        v-for="isImg in item.imgs"
+                                        :key="isImg.key"
+                                        :src="`/image-service/common/image_get?systemId=dataPlatform&key=${isImg.key}`"
+                                    />
 
-                  <video controls style="width:100%;" v-for="v in videoList" :key="index"
-                         :title="v.name">
-                    <source
-                        :src="`/image-service/common/file_get?systemId=dataPlatform&key=${v.key}`"
-                        type="video/mp4">
-                    您的浏览器不支持 HTML5 video ,暂无法播放。
-                  </video>
-                </el-card>
-              </el-timeline-item>
-            </el-timeline>
-          </div>
-        </el-form>
-      </div>
-    </el-scrollbar>
-    <el-dialog title="全景图" :visible.sync="dialogVisible" width="70%" append-to-body>
-      一张图
-    </el-dialog>
-  </div>
+                                    <video controls style="width: 100%" v-for="(v, i) in item.videoList" :key="`video_${i}`" :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>
+                    </div>
+                </el-form>
+            </div>
+        </el-scrollbar>
+        <el-dialog title="全景图" :visible.sync="dialogVisible" width="70%" append-to-body> 一张图 </el-dialog>
+    </div>
 </template>
 
 <script>
@@ -119,203 +106,213 @@ import { mapGetters } from "vuex"
 import { categoryCount, modelCategoryCount } from "@/api/data_admin/buildTaskApi"
 
 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)
-    },
+    components: {},
     computed: {
-      ...mapGetters("layout", ["projectId"]),
-      notFoundList() {
-        if (this.detail && this.detail.component && this.detail.component.length) {//是否存在部件
-          let index = this.detail.component.findIndex(item => {
-            return item.taskState == -1
-          })
-          if (index != -1) {//部件中存在未找到的对象
-            this.detail.isComponent = true
-            return this.detail.component[index].taskPicList ? this.detail.component[index].taskPicList : []
-          } else {//部件全部找到
-            this.detail.isComponent = false
-            return this.detail.taskPicList ? this.detail.taskPicList : []
-          }
-        } else {
-          this.detail.isComponent = false
-          if (this.detail && this.detail.taskPicList && this.detail.taskState.length) {
-            return this.detail.taskPicList
-          } else {
-            return []
-          }
-        }
-      },
-      panoramaList() {
-        if (this.notFoundList && this.notFoundList.length) {
-          return this.notFoundList.filter(item => {
-            return item.type == 'panorama'
-          })
-        } else {
-          return []
-        }
-      },
-      imgList() {
-        if (this.notFoundList && this.notFoundList.length) {
-          return this.notFoundList.filter(item => {
-            return item.type == 'image'
-          })
-        } else {
-          return []
-        }
-      },
-      videoList() {
-        if (this.notFoundList && this.notFoundList.length) {
-          return this.notFoundList.filter(item => {
-            return item.type == 'video'
-          })
-        } else {
-          return []
-        }
-      },
-      srcList() {
-        let nowIndex = this.imgList.findIndex(item => {
-          return item.key == this.nowUrl
-        })
-        let index = nowIndex >= 1 ? nowIndex : 0;
-        let tempArr1 = this.imgList.slice(0, index);
-        let tempArr2 = this.imgList.slice(index, this.imgList.length);
+        ...mapGetters("layout", ["projectId"]),
+        notFoundList() {
+            if (this.detail && this.detail.component && this.detail.component.length) {//是否存在部件
+                let index = this.detail.component.findIndex(item => {
+                    return item.taskState == -1
+                })
+                if (index != -1) {//部件中存在未找到的对象
+                    this.detail.isComponent = true
+                    return this.detail.component[index].taskPicList ? this.detail.component[index].taskPicList : []
+                } else {//部件全部找到
+                    this.detail.isComponent = false
+                    return this.detail.taskPicList ? this.detail.taskPicList : []
+                }
+            } else {
+                this.detail.isComponent = false
+                if (this.detail && this.detail.taskPicList && this.detail.taskState.length) {
+                    return this.detail.taskPicList
+                } else {
+                    return []
+                }
+            }
+        },
+        panoramaList() {
+            if (this.notFoundList && this.notFoundList.length) {
+                return this.notFoundList.filter(item => {
+                    return item.type == 'panorama'
+                })
+            } else {
+                return []
+            }
+        },
+        imgList() {
+            if (this.notFoundList && this.notFoundList.length) {
+                return this.notFoundList.filter(item => {
+                    return item.type == 'image'
+                })
+            } else {
+                return []
+            }
+        },
+        videoList() {
+            if (this.notFoundList && this.notFoundList.length) {
+                return this.notFoundList.filter(item => {
+                    return item.type == 'video'
+                })
+            } else {
+                return []
+            }
+        },
+        srcList() {
+            let nowIndex = this.imgList.findIndex(item => {
+                return item.key == this.nowUrl
+            })
+            let index = nowIndex >= 1 ? nowIndex : 0;
+            let tempArr1 = this.imgList.slice(0, index);
+            let tempArr2 = this.imgList.slice(index, this.imgList.length);
 
-        let res = tempArr2.concat(tempArr1).map(item => {
-          return `/image-service/common/image_get?systemId=dataPlatform&key=${item.key}`
-        });
-        return res;
-      }
+            let res = tempArr2.concat(tempArr1).map(item => {
+                return `/image-service/common/image_get?systemId=dataPlatform&key=${item.key}`
+            });
+            return res;
+        },
+        arr() {
+            let { confirmTime, positivePhotoTime, qrCodeTime, nameplateTime, sidePhotoTime, videoTime, equipProblemTime, equipProblem, taskPicList, processTime, regionPhotoTime } = this.detail;
+            let arr = []
+            processTime && arr.push({
+                timestamp: processTime,
+                time: new Date(processTime).getTime(),
+                content: '执行任务',
+            })
+            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('设备左侧照片' || '设备右侧照片'))
+            })
+            regionPhotoTime && arr.push({
+                timestamp: regionPhotoTime,
+                time: new Date(regionPhotoTime).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: '已确认的设备信息'
+            })
+            return arr.map(i => ({ ...i })).sort((a, b) => a.time - b.time)
+        },
     },
     props: {
-      detail: Object,
-      type: String
+        detail: Object,
+        type: String
     },
     data() {
-      return {
-        dialogVisible: false,//全景图弹出框
-        nowUrl: '',//当前正在显示的图
-        arr: [],
-        Name: '',
-        Count: '', //包含部件
-      };
+        return {
+            dialogVisible: false,//全景图弹出框
+            nowUrl: '',//当前正在显示的图
+            Name: '',
+            Count: '', //包含部件
+        };
     },
     methods: {
-      //  查询设备部件数量
-      handleContent(row) {
-        let param = {
-          id: row.id,
-          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
-          }
+        //  查询设备部件数量
+        handleContent(row) {
+            let param = {
+                id: row.id,
+                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 = {
-          id: row.id,
-          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
-          }
+            })
+        },
+        //  查询模型部件数量
+        handleModelContent(row) {
+            let param = {
+                id: row.id,
+                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
+                }
 
-        })
-      }
+            })
+        }
     },
     watch: {
-      'detail.TaskId'() {
-        console.log(this.detail)
-      }
+        'detail.id'() {
+            console.log(this.detail)
+        }
     }
-  };
+};
 </script>
 <style lang="less" scoped>
-  .detail-box {
+.detail-box {
     width: 100%;
     height: 100%;
     box-sizing: border-box;
 
     /deep/ .el-scrollbar__wrap {
-      overflow-x: hidden;
+        overflow-x: hidden;
     }
 
     /deep/ .el-icon-circle-close {
-      color: white;
+        color: white;
     }
 
     /deep/ .el-form-item__content {
-      text-overflow: ellipsis;
-      overflow: hidden;
+        text-overflow: ellipsis;
+        overflow: hidden;
     }
 
     .detail-item {
-      width: calc(100% - 30px);
-      margin: 15px 15px 10px;
-      padding: 10px;
-      box-sizing: border-box;
-      border-left: 1px solid #eee;
-      box-shadow: 0px 1px 5px 0px rgba(59, 66, 84, 0.15);
+        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;
+        position: relative;
+        cursor: pointer;
     }
-  }
+}
 </style>

+ 10 - 1
src/components/data_admin/buildTask/dialog/modelTaskDialog.vue

@@ -2,7 +2,7 @@
   <el-dialog :title="title" :visible.sync="dialogVisible" :before-close="handleClose" width="900px" id="addEqDialog">
     <div class="table-box">
       <el-table :data="tableData" style="width: 100%" height="350" v-loading="loading" :header-cell-style="headerStyle"
-                ref="multipleTable"
+                ref="multipleTable" :row-class-name="getRowClassName"
                 @selection-change="handleSelectionChange">
         <el-table-column type="selection" width="55"></el-table-column>
         <el-table-column type="expand">
@@ -210,6 +210,11 @@ export default {
       })
       this.page.total = res.total
     },
+    getRowClassName({row, rowIndex}){
+        if (!(row.ComponentCount && row.ComponentCount.length)) {
+            return 'row-expand-cover';
+        }
+    },
     //选中项修改
     handleSelectionChange(val) {
       this.selections = val;
@@ -304,6 +309,10 @@ export default {
   color: #99a9bf;
 }
 
+.row-expand-cover .el-table__expand-icon{
+    visibility:hidden;
+}
+
 .demo-table-expand .el-form-item {
   margin-right: 0;
   margin-bottom: 0;

+ 18 - 4
src/components/data_admin/buildTask/table/assetsTable.vue

@@ -10,8 +10,20 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column prop="localName" :label="`${inSpaceType}本地名称`" show-overflow-tooltip min-width="100"></el-table-column>
-        <el-table-column prop="localId" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column :label="`${inSpaceType}本地名称`" show-overflow-tooltip min-width="100">
+            <template slot-scope="scope">
+                <div>
+                    {{scope.row.localName || '--'}}
+                </div>
+            </template>
+        </el-table-column>
+        <el-table-column :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100">
+            <template slot-scope="scope">
+                <div>
+                    {{scope.row.localId || '--'}}
+                </div>
+            </template>
+        </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>
@@ -138,6 +150,7 @@ export default {
         deleteAssetsTask(params, res => {
           this.$message.success('删除成功')
           this.getTableData()
+          this.$emit('upData')
         })
       }).catch(() => {
         this.$message("取消删除")
@@ -147,7 +160,7 @@ export default {
     handleRegenerate(index, row){
       let params = {
         content: [{
-          equipId: row.id,
+          equipId: row.equipId,
           schemeId: row.schemeId,
           taskState: -1
         }]
@@ -155,6 +168,7 @@ export default {
       createAssetsTask(params, res => {
         this.$message.success('重新生成任务成功!')
         this.getTableData()
+        this.$emit('upData')
       })
     },
     //认可此任务执行情况
@@ -163,7 +177,7 @@ export default {
         content: [{
           confirmingPersonId: this.userInfo.userId,
           confirmingPersonName: this.userInfo.userName,
-          taskId: row.id,
+          id: row.id,
           taskState: 0
         }]
       }

+ 13 - 7
src/components/data_admin/buildTask/table/deviceTable.vue

@@ -13,16 +13,22 @@
         <el-table-column :label="`${inSpaceType}本地名称`" show-overflow-tooltip min-width="100">
           <template slot-scope="scope">
             <div>
-              {{scope.row.localName}}
-              <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"
+              {{scope.row.localName || '--'}}
+              <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>
         </el-table-column>
-        <el-table-column prop="localId" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
-        <el-table-column prop="equipCategory.equipName" :label="`${inSpaceType}类型`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100">
+            <template slot-scope="scope">
+                <div>
+                    {{scope.row.localId || '--'}}
+                </div>
+            </template>
+        </el-table-column>
+        <el-table-column prop="equipCategory.name" :label="`${inSpaceType}类型`" 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>
         <el-table-column prop="action" label="操作" min-width="100">
@@ -189,7 +195,7 @@ export default {
     handleRegenerate(index, row){
       let params = {
         content: [{
-          equipId: row.id,
+          equipId: row.equipId,
           taskState: -1,
           schemeId: row.schemeId
         }]
@@ -207,7 +213,7 @@ export default {
         content: [{
           confirmingPersonId: this.userInfo.userId,
           confirmingPersonName: this.userInfo.userName,
-          taskId: row.id,
+          id: row.id,
           taskState: 0
         }]
       }

+ 12 - 4
src/components/data_admin/buildTask/table/modelTable.vue

@@ -7,7 +7,7 @@
         <el-table-column :label="`${inSpaceType}本地名称`" show-overflow-tooltip min-width="100">
           <template slot-scope="scope">
             <div>
-              {{scope.row.localName}}
+              {{scope.row.localName || '--'}}
               <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">
@@ -15,7 +15,13 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column prop="localId" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100">
+            <template slot-scope="scope">
+                <div>
+                    {{scope.row.localId || '--'}}
+                </div>
+            </template>
+        </el-table-column>
         <el-table-column prop="equipCategory.name" :label="`${inSpaceType}类型`" show-overflow-tooltip min-width="80"></el-table-column>
         <el-table-column prop="bimId" label="BIM ID" show-overflow-tooltip min-width="220"></el-table-column>
         <el-table-column prop="taskState" label="任务执行情况" show-overflow-tooltip min-width="60"></el-table-column>
@@ -155,6 +161,7 @@ export default {
         deleteModelTask(params, res => {
           this.$message.success('删除成功')
           this.getTableData()
+          this.$emit('upData')
         })
       }).catch(() => {
         this.$message("取消删除")
@@ -164,7 +171,7 @@ export default {
     handleRegenerate(index, row){
       let params = {
         content: [{
-          equipId: row.id,
+          equipId: row.equipId,
           fileId: row.fileId,
           fileName: row.fileName,
           folderId: row.folderId,
@@ -176,6 +183,7 @@ export default {
       createModelTask(params, res => {
         this.$message.success('重新生成任务成功!')
         this.getTableData()
+        this.$emit('upData')
       })
     },
     //认可此任务执行情况
@@ -184,7 +192,7 @@ export default {
         content: [{
           confirmingPersonId: this.userInfo.userId,
           confirmingPersonName: this.userInfo.userName,
-          taskId: row.id,
+          id: row.id,
           taskState: 0
         }]
       }

+ 14 - 2
src/components/data_admin/buildTask/table/replaceTable.vue

@@ -10,8 +10,20 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column prop="localId" :label="`${inSpaceType}本地名称`" show-overflow-tooltip min-width="100"></el-table-column>
-        <el-table-column prop="localName" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column :label="`${inSpaceType}本地名称`" show-overflow-tooltip min-width="100">
+            <template slot-scope="scope">
+                <div>
+                    {{scope.row.localName || '--'}}
+                </div>
+            </template>
+        </el-table-column>
+        <el-table-column :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100">
+            <template slot-scope="scope">
+                <div>
+                    {{scope.row.localId || '--'}}
+                </div>
+            </template>
+        </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>

+ 14 - 2
src/components/data_admin/buildTask/table/tearTable.vue

@@ -10,8 +10,20 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column prop="localId" :label="`${inSpaceType}本地名称`" show-overflow-tooltip min-width="100"></el-table-column>
-        <el-table-column prop="localName" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column :label="`${inSpaceType}本地名称`" show-overflow-tooltip min-width="100">
+            <template slot-scope="scope">
+                <div>
+                    {{scope.row.localName || '--'}}
+                </div>
+            </template>
+        </el-table-column>
+        <el-table-column :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100">
+            <template slot-scope="scope">
+                <div>
+                    {{scope.row.localId || '--'}}
+                </div>
+            </template>
+        </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>

+ 51 - 49
src/components/data_admin/zoneInput.vue

@@ -4,17 +4,22 @@
       <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.name" 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 disabled placeholder="请在台账中维护该类型信息点"></el-input>
+          <template v-if="item.category=='STATIC'">
+            <el-input v-model="item.inputValue" v-if="item.dataType == dataTypeMap.DOUBLE || item.dataType == dataTypeMap.INTEGER" type="number">
+              <template slot="append" v-if="item.Unit">{{item.Unit}}</template>
+            </el-input>
+            <el-input v-model="item.inputValue" v-else-if="item.dataType == dataTypeMap.STRING"></el-input>
+            <el-select v-model="item.inputValue" v-else-if="item.dataType == dataTypeMap.ENUM || item.dataType == dataTypeMap.BOOLEAN" 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.dataType == dataTypeMap.MENUM" placeholder="请在台账中维护该类型信息点"
+              :props="item.props" :options="item.options" filterable clearable disabled :show-all-levels="false"></el-cascader>
+            <el-input v-model="item.inputValue" v-else disabled placeholder="请在台账中维护该类型信息点"></el-input>
+          </template>
+          <template v-else>
+            <el-input v-model="item.inputValue"></el-input>
+          </template>
         </el-form-item>
       </div>
     </el-form>
@@ -23,12 +28,14 @@
 
 <script>
 import tools from "@/utils/scan/tools";
+import dataTypeMap from "@/utils/handsontable/dataTypeMap"
 export default {
   data() {
     return {
       form: {},
       inputTypeList: {},//输入框表头种类
       inputData: [],//所有输入框
+      dataTypeMap: dataTypeMap
     }
   },
   props: {
@@ -37,8 +44,7 @@ export default {
       type: String
     }
   },
-  created() {
-  },
+  created() { },
   methods: {
     //初始化
     init(val) {
@@ -53,50 +59,46 @@ export default {
       this.inputData = this.inputData.filter(item => {
         return item.editable == true && item.visible == true && item.code;
       })
-      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;
-          if (item.dataSource instanceof Array) {
-            options = item.dataSource;
-          } else {
-            options = JSON.parse(item.dataSource)
-          }
-          item.inputValue = '';
-          item.options = options;
-        }
-        else if(cascaderInput.indexOf(item.inputMode) != -1){
-          let options;
-          if (item.dataSource) {
+        if (item.category == 'STATIC') {
+          if (item.dataType == dataTypeMap.DOUBLE || item.dataType == dataTypeMap.INTEGER) {
+            item.inputValue = null;
+          } else if (item.dataType == dataTypeMap.STRING) {
+            item.inputValue = '';
+          } else if (item.dataType == dataTypeMap.ENUM || item.dataType == dataTypeMap.BOOLEAN) {
+            let options;
             if (item.dataSource instanceof Array) {
               options = item.dataSource;
             } else {
               options = JSON.parse(item.dataSource)
             }
-          } else {
-            options = []
-          }
-          if (options[0] && options[0].content) {
-            item.props = {
-              value: 'code',
-              label: 'name',
-              children: 'content',
-              checkStrictly: true
+            item.inputValue = '';
+            item.options = options;
+          } else if(item.dataType == dataTypeMap.MENUM){
+            let options;
+            if (item.dataSource) {
+              if (item.dataSource instanceof Array) {
+                options = item.dataSource;
+              } else {
+                options = JSON.parse(item.dataSource)
+              }
+            } else {
+              options = []
+            }
+            if (options[0] && options[0].content) {
+              item.props = {
+                value: 'code',
+                label: 'name',
+                children: 'content',
+                checkStrictly: true
+              }
             }
+            item.options = options;
+            item.inputValue = [];
+          } else {
+            item.inputValue = '';
           }
-          item.options = options;
-          item.inputValue = [];
-        }
-        else {
+        } else {
           item.inputValue = '';
         }
       });

+ 0 - 502
src/components/dialogHanson/addDevice.vue

@@ -1,502 +0,0 @@
-<template>
-  <div>
-    <div class="hanson-bar">
-      <span>当前选择的设备类型:{{deviceType.facility}}</span>
-      <el-button size="small" @click="undo" icon="iconfont icon-undo">撤销</el-button>
-      <el-button size="small" @click="reset" icon="iconfont icon-shuaxin">刷新</el-button>
-    </div>
-    <qrcode :dialog="dialog" :addBody="true" ref="qrcode"></qrcode>
-    <firm :dialog="dialog"></firm>
-    <supply-dialog :dialog="dialog"></supply-dialog>
-    <supplier-dialog :dialog="dialog"></supplier-dialog>
-    <guarantee-dialog :dialog="dialog"></guarantee-dialog>
-    <upload-files-dialog :dialog="dialog"></upload-files-dialog>
-    <div v-show="main && main.length" id="myHandson" ref="myHandson"></div>
-  </div>
-</template>
-<script>
-import { getSpaceHeader } from "@/api/scan/request";
-import { mapGetters, mapActions } from "vuex";
-import tools from "@/utils/scan/tools";
-import qrcode from "@/components/ledger/lib/qrcode";
-import firm from "@/components/dialogs/list/firm";
-import supplyDialog from "@/components/dialogs/list/supplyDialog";
-import supplierDialog from "@/components/dialogs/list/supplierDialog";
-import guaranteeDialog from "@/components/dialogs/list/guaranteeDialog";
-import uploadFilesDialog from "@/components/dialogs/list/filesDialog";
-
-export default {
-  props: {
-    deviceType: {
-      type: Object
-    }
-  },
-  components: {
-    qrcode, //二维码页面
-    firm, //
-    supplyDialog,
-    supplierDialog,
-    guaranteeDialog,
-    uploadFilesDialog,
-  },
-  computed: {
-    ...mapGetters("layout", ["projectId", "secret", "userId"]),
-  },
-  data() {
-    let table = function (num) {
-      let main = []
-      for (let i = 0; i < num; i++) {
-        main.push({})
-      }
-      return main
-    }
-    return {
-      main: table(20),
-      mess: {},
-      headers: null,
-      page: {
-        size: 50,
-        sizes: [10, 30, 50, 100, 150, 200],
-        total: 400,
-        currentPage: 1
-      },
-      dialog: {
-        qrcode: false, //二维码弹窗
-        firm: false, //厂商弹窗
-        supply: false, //选择供应合同
-        supplier: false, //供应商选择
-        guarantee: false //选择保单
-      }
-    };
-  },
-  created() {
-  },
-  mounted() { },
-  methods: {
-
-    //获取header的mess
-    getHeader(mess) {
-      this.mess = mess;
-      console.log(this.mess);
-    },
-
-    //获取主体内容
-    getMain(floorMess) {
-      console.log(floorMess);
-    },
-
-    //获取表头
-    getData() {
-      getSpaceHeader({
-        code: this.deviceType.code,
-        ProjId: this.projectId
-      }).then(res => {
-        this.headers = res.data.Content;
-        if (!!this.hot) {
-          this.hot.destroy();
-          this.hot = null;
-        }
-        this.initHot();
-      });
-    },
-
-    //撤回
-    undo() {
-      this.hot.undo();
-    },
-
-    //刷新
-    reset() {
-      this.getData();
-    },
-
-    //添加设备
-    addDevice() {
-      console.log("addDevice")
-    },
-
-    /**
-     * 表头文案处理函数
-     * @param arr header数组数据
-     *
-     * @return 处理好的文案
-     */
-    delHeader(arr) {
-      let data = arr.map(item => {
-        if (
-          item.InputMode == "A1" ||
-          item.InputMode == "A2" ||
-          item.InputMode == "B1" ||
-          item.InputMode == "C5" ||
-          item.InputMode == "D1" ||
-          item.InputMode == "D2" ||
-          item.InputMode == "X" ||
-          item.InputMode == "L" ||
-          item.InputMode == "L1" ||
-          item.InputMode == "L2" ||
-          item.InputMode == "M" ||
-          item.InputMode == "F1" ||
-          item.InputMode == "F2"
-        ) {
-          if (item.unit == "") {
-            return item.InfoPointName;
-          } else {
-            return item.InfoPointName + "(" + item.unit + ")";
-          }
-        } else {
-          return undefined;
-        }
-      });
-      data = data.filter(item => item);
-      data.unshift("同时创建资产", "所属建筑楼层", "所属系统实例");
-      return data;
-    },
-
-    /**
-     * 表头数据处理函数
-     * @param arr header数组数据
-     *
-     * @return 处理好的数据格式
-     */
-    getType(arr) {
-      let data = arr.map(item => {
-        //二维码
-        if (item.infoPointCode == "EquipQRCode") {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-        //厂商选择
-        if (item.infoPointCode == "Brand" || item.infoPointCode == "Specification") {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-        if (item.infoPointCode == "SupplierContractID") {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-
-        if (item.infoPointCode == "InsuranceNum") {
-          //选择保单
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-
-        if (item.infoPointCode == "InsuranceFile" || item.infoPointCode == "Archive") {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-
-        if (
-          item.infoPointCode == "InstallLocation" ||
-          item.infoPointCode == "InstallPic" ||
-          item.infoPointCode == "InstallDrawing" ||
-          item.infoPointCode == "Nameplate" ||
-          item.infoPointCode == "Pic" ||
-          item.infoPointCode == "Drawing"
-        ) {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-
-        if (
-          item.infoPointCode == "maintainer" ||
-          item.infoPointCode == "Supplier" ||
-          item.infoPointCode == "Insurer" ||
-          item.infoPointCode == "InsurerContactor"
-        ) {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-        if (item.InputMode == "D1") {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.customDropdownRenderer,
-            editor: "chosen",
-            chosenOptions: {
-              // multiple: true,//多选
-              data: item.DataSource.Content || ""
-            }
-          };
-        } else if (item.InputMode == "A1" || item.InputMode == "A2") {
-          return {
-            data: "infos." + item.infoPointCode,
-            type: "numeric",
-            numericFormat: {
-              pattern: "0,0.00"
-              // culture: 'de-DE' // use this for EUR (German),
-              // more cultures available on http://numbrojs.com/languages.html
-            }
-          };
-        } else if (item.InputMode == "C5") {
-          return {
-            data: "infos." + item.infoPointCode,
-            type: "date",
-            dateFormat: "YYYY-MM-DD",
-            correctFormat: true
-          };
-        } else if (
-          item.InputMode == "B1" ||
-          item.InputMode == "L" ||
-          item.InputMode == "L1" ||
-          item.InputMode == "L2"
-        ) {
-          return {
-            data: "infos." + item.infoPointCode
-          };
-        } else if (
-          item.InputMode == "X" ||
-          item.InputMode == "F2"
-          // item.InputMode == "L1" ||
-          // item.InputMode == "L2"
-        ) {
-          return {
-            data: "infos." + item.infoPointCode,
-            readOnly: true
-          };
-        } else if (item.InputMode == "D2") {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.customDropdownRenderer,
-            editor: "chosen",
-            chosenOptions: {
-              multiple: true, //多选
-              data: item.DataSource.Content || ""
-            }
-          };
-        } else {
-          return undefined;
-        }
-
-      });
-      data.unshift(
-        {
-          type: "checkbox",
-          checkedTemplate: 1,
-          uncheckedTemplate: 0,
-          data: "Checked",
-          label: {
-            position: "after",
-          }
-        },
-        {
-          data: "flowBuild",
-          renderer: tools.customDropdownRenderer,
-          editor: "chosen",
-          chosenOptions: {
-            // multiple: true,//多选
-            // data: item.DataSource.Content || ""
-          }
-        },
-        {
-          data: "system",
-          renderer: tools.customDropdownRenderer,
-          editor: "chosen",
-          chosenOptions: {
-            // multiple: true,//多选
-            // data: item.DataSource.Content || ""
-          }
-        }
-      );
-      data = data.filter(item => item);
-      return data;
-    },
-
-    //初始化插件
-    initHot() {
-      var container = document.getElementById("myHandson");
-      let winHeight = document.documentElement.clientHeight;
-      this.hot = new Handsontable(container, {
-        data: this.main,
-        colHeaders: this.delHeader(this.headers), //表头文案
-        columns: this.getType(this.headers), //数据显示格式
-        filters: true,
-        height: winHeight - 100 - 50 - 60,
-        columnSorting: true, //添加排序
-        sortIndicator: true, //添加排序
-        renderAllRows: true,
-        autoColumnSize: true,
-        language: "zh-CN",
-        manualColumnResize: true,
-        manualColumnMove: true,
-        dropdownMenu: [
-          "filter_by_condition",
-          "filter_by_value",
-          "filter_action_bar"
-        ],
-        contextMenu: this.onlyRead ? false :{
-          items: {
-            remove_row: {
-              name: "删除该业务空间"
-            }
-          }
-        },
-        // 事件
-        afterChange: this.tdChange, //修改后
-        afterFilter: this.trimmedRows, //排序前
-        beforeRemoveRow: this.romoveFm, //右键删除
-        afterOnCellMouseDown: this.eventClick //鼠标点击
-      });
-      let pro = document.getElementById("hot-display-license-info");
-      if (!!pro) {
-        pro.parentNode.removeChild(pro);
-      }
-      this.isLoading = false;
-    },
-
-    //表格中的点击
-    eventClick(el, rowArr) {
-      let filter = this.filtersArr;
-      //被筛选过后的数组
-      let trimmedArr = this.trimmedRows();
-      //是否启用了排序
-      let isSort = this.hot.getPlugin("columnSorting").isSorted();
-      if (trimmedArr.length && isSort) {
-        let sortArr = this.myHotArr.getPlugin("columnSorting").rowsMapper
-          .__arrayMap;
-        let infos = this.main[trimmedArr[sortArr[rowArr.row]]];
-        this.getInfors(infos, rowArr);
-      } else if (isSort) {
-        //排序后的数组
-        let sortArr = this.hot.getPlugin("columnSorting").rowsMapper.__arrayMap;
-        let infos = this.main[sortArr[rowArr.row]];
-        this.getInfors(infos, rowArr);
-      } else if (trimmedArr.length) {
-        let infos = this.main[trimmedArr[rowArr.row]];
-        this.getInfors(infos, rowArr);
-      } else {
-        let infos = this.main[rowArr.row];
-        this.getInfors(infos, rowArr);
-      }
-    },
-
-    getInfors(infos, row) {
-      //点击的是表头
-      if (row.row < 0) {
-        return;
-      }
-      //其他的开始判断
-      let val = this.hot.colToProp(row.col);
-      if (val == "infos.EquipQRCode") {
-        this.dialog.qrcode = true;
-        this.$refs.qrcode.getCanvas(1111);
-      }
-
-      if (val == "infos.Brand" || val == "infos.Specification") {
-        this.dialog.firm = true;
-      }
-
-      if (val == "infos.SupplierContractID") {
-        this.dialog.supply = true;
-      }
-
-      if (val == "infos.InsuranceNum") {
-        //选择保单
-        this.dialog.guarantee = true;
-      }
-
-      if (val == "infos.InsuranceFile" || val == "infos.Archive") {
-        alert("上传文件");
-      }
-
-      if (
-        val == "infos.InstallLocation" ||
-        val == "infos.InstallPic" ||
-        val == "infos.InstallDrawing" ||
-        val == "infos.Nameplate" ||
-        val == "infos.Pic" ||
-        val == "infos.Drawing"
-      ) {
-        alert("上传图片");
-      }
-
-      if (
-        val == "infos.maintainer" ||
-        val == "infos.Supplier" ||
-        val == "infos.Insurer" ||
-        val == "infos.InsurerContactor"
-      ) {
-        this.dialog.supplier = true;
-      }
-      console.log(val);
-    },
-
-    //获取被筛选掉的行号
-    trimmedRows() {
-      // var plugin = hot.getPlugin('trimRows').trimmedRows;//获取被筛选掉的行号
-      var plugin = this.hot.getPlugin("trimRows").trimmedRows;
-      let dataLength = this.main.length;
-      let dataArr = new Array();
-      for (let i = 0; i < dataLength; i++) {
-        dataArr.push(i);
-      }
-      if (plugin.length <= 0) {
-        dataArr = undefined;
-      } else {
-        dataArr = this.array_diff(dataArr, plugin);
-      }
-      return dataArr || [];
-      // var DataArray = new Array();
-
-      // for (var i = 0; i < plugin.length; i++) {
-      //     // 通过行号获取数据
-      //     DataArray.push(this.hot.getSourceDataAtRow(plugin[i]));
-      // }
-    },
-
-    //判断是否为空行
-    isEmptyRow(instance, row) {
-      var rowData = instance.countRows();
-      for (var i = 0, ilen = rowData.length; i < ilen; i++) {
-        if (rowData[i] !== null) {
-          return false;
-        }
-      }
-      return true;
-    }
-  },
-  watch: {
-    deviceType: {
-      handler(newName, oldName) {
-        this.getData()
-      },
-      immediate: true
-    }
-  }
-};
-</script>
-<style lang="less">
-.hanson-bar {
-  height: 40px;
-  padding: 5px 10px;
-  font-size: 14px;
-  overflow: hidden;
-  margin-top: 10px;
-  .iconfont {
-    font-size: 12px;
-  }
-  .el-button {
-    // margin-right: 10px;
-  }
-}
-</style>

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

@@ -1,770 +0,0 @@
-<!--
-    上传文件的弹窗
--->
-
-<template>
-  <div v-show="dialog.addDevice">
-    <el-dialog
-      :title="title"
-      :center="isCenter"
-      :visible.sync="dialog.addDevice"
-      :width="width"
-      :fullscreen="isFull"
-    >
-      <div id="addDevice">
-        <div v-show="!isCenter">
-          <my-cascader @change="changeCader"></my-cascader>
-        </div>
-        <div v-if="isCenter">
-          <div>
-            <div class="hanson-bar" style="overflow:hidden;">
-              <el-button
-                style="float:right;"
-                size="small"
-                @click="undo"
-                icon="iconfont icon-undo"
-              >&nbsp;&nbsp;&nbsp;撤销&nbsp;&nbsp;&nbsp;</el-button>
-              <el-button
-                style="float:right;"
-                size="small"
-                @click="reset"
-                icon="iconfont icon-shuaxin"
-              >&nbsp;&nbsp;&nbsp;刷新&nbsp;&nbsp;&nbsp;</el-button>
-              <el-button style="float:right;" size="small" @click="addMain">增加</el-button>
-              <el-input
-                v-model="addNum"
-                placeholder="增加个数"
-                style="width:50px;float:right;"
-                size="small"
-              ></el-input>
-            </div>
-            <div v-show="main && main.length" id="myHandson" ref="myHandson"></div>
-          </div>
-        </div>
-      </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="addSpace">添加业务空间</el-button>
-      </span>
-    </el-dialog>
-    <qrcode :dialog="myDialog" :addBody="true" ref="qrcode"></qrcode>
-    <firm ref="firm" :dialog="myDialog"></firm>
-    <supply-dialog ref="supply" :dialog="myDialog"></supply-dialog>
-    <supplier-dialog ref="supplier" @changeSupplier="supplierChange" :dialog="myDialog"></supplier-dialog>
-    <guarantee-dialog ref="guarantee" :dialog="myDialog"></guarantee-dialog>
-    <upload-files-dialog
-      ref="upload"
-      @changeFile="fileChange"
-      :keysArr="filesArr"
-      :dialog="myDialog"
-    ></upload-files-dialog>
-    <upload-img-dialog @changeFile="imgChange" :keysArr="imgsArr" :dialog="myDialog"></upload-img-dialog>
-    <maintainer-dialog @changeMaintainer="changeMaintainer" ref="maintainer" :dialog="myDialog"></maintainer-dialog>
-    <insurer-dialog @changeInsurer="changeInsurer" ref="insurer" :dialog="myDialog"></insurer-dialog>
-    <pic-dialog :dialog="myDialog" :keysArr="picsArr" @change="changePics"></pic-dialog>
-  </div>
-</template>
-<script>
-
-import myCascader from "@/components/lib/cascaders/assets";
-import hansonTable from "@/components/dialogHanson/addDevice";
-import { getSpaceHeader } from "@/api/scan/request";
-import { mapGetters, mapActions } from "vuex";
-import tools from "@/utils/scan/tools";
-import qrcode from "@/components/ledger/lib/qrcode";
-import firm from "@/components/dialogs/list/firm";
-import supplyDialog from "@/components/dialogs/list/supplyDialog";
-import supplierDialog from "@/components/dialogs/list/supplierDialog";
-import maintainerDialog from "@/components/dialogs/list/maintainerDialog";
-import insurerDialog from "@/components/dialogs/list/insurerDialog";
-import guaranteeDialog from "@/components/dialogs/list/guaranteeDialog";
-import uploadFilesDialog from "@/components/dialogs/list/filesDialog";
-import uploadImgDialog from "@/components/dialogs/list/uploadImgDialog";
-import picDialog from "@/components/dialogs/list/picDialog"
-
-let table = function (num) {
-  let main = []
-  for (let i = 0; i < num; i++) {
-    main.push({})
-  }
-  return main
-}
-export default {
-  components: {
-    myCascader,
-    hansonTable,
-    qrcode, //二维码页面
-    firm, //
-    supplyDialog,
-    supplierDialog,
-    guaranteeDialog,
-    uploadFilesDialog,
-    maintainerDialog,
-    insurerDialog,
-    uploadImgDialog,
-    picDialog
-  },
-  props: {
-    dialog: {
-      type: Object,
-      default: function () {
-        return {
-          addDevice: false
-        };
-      }
-    },
-    headerData: {
-      type: Array,
-      default: function () {
-        return []
-      }
-    }
-  },
-  computed: {
-    ...mapGetters("layout", ["projectId", "secret", "userId"]),
-  },
-  data() {
-    return {
-      width: "30%",
-      isFull: true,//dialog是否为全屏
-      title: "添加业务空间",
-      isCenter: true,
-      deviceType: {},
-      main: table(10),
-      mess: {},
-      headers: null,
-      page: {
-        size: 50,
-        sizes: [10, 30, 50, 100, 150, 200],
-        total: 400,
-        currentPage: 1
-      },
-      id: null,
-      myDialog: {
-        qrcode: false, //二维码弹窗
-        firm: false, //厂商弹窗
-        supply: false, //选择供应合同
-        supplier: false, //供应商选择
-        guarantee: false, //选择保单
-        maintainer: false, //选择维修商
-        insurer: false, //选择保险公司
-        uploadFiles: false,//上传文件
-        uploadImgs: false,//上传单个图片
-        pic: false, //多个图片
-      },
-      addNum: 1,//增加个数
-      row: null,//被修改的row
-      filesArr: [],//保存临时的文件key
-      messKey: null,
-      imgsArr: [],//临时保存的图片key数组
-      picsArr: [],//临时设备图片keys数组
-    };
-  },
-  created() {
-
-  },
-  mounted() {
-  },
-  methods: {
-    //增加个数
-    addMain() {
-      for (let i = 0; i < this.addNum; i++) {
-        this.main.push({})
-      }
-      this.hot.loadData(this.main)
-    },
-
-    //添加业务空间确定
-    addSpace() {
-      console.log(this.main)
-      let pushData = []
-      this.main.map(item => {
-        if (!!item.infos) {
-          for (let key in item.infos) {
-            if (!!item.infos[key]) {
-              pushData.push(item)
-            }
-          }
-        }
-      })
-      console.log(pushData)
-    },
-
-    //下一步
-    // step(val) {
-    //   if (!!val) {
-    //     this.isFull = true
-    //     this.isCenter = true
-    //     this.title = "添加资产"
-    //     this.getData()
-    //   } else {
-    //     this.isFull = false
-    //     this.isCenter = false
-    //   }
-    // },
-    //修改设备类型
-    changeCader(val) {
-      this.deviceType = val
-    },
-    //获取header的mess
-    getHeader(mess) {
-      this.mess = mess;
-    },
-
-    //获取主体内容
-    // getMain(floorMess) {
-    //   console.log(floorMess);
-    // },
-
-    //获取表头
-    getData() {
-      this.main = table(10)
-      getSpaceHeader({
-        code: "space",
-        ProjId: this.projectId
-      }).then(res => {
-        this.headers = res.data.Content;
-        if (!!this.hot) {
-          this.hot.destroy();
-          this.hot = null;
-        }
-        let data = tools.getItem(this.deviceType.code)
-        if (!!data) {
-          this.main = data
-        }
-        this.initHot();
-      });
-    },
-
-    //撤回
-    undo() {
-      this.hot.undo();
-    },
-
-    //刷新
-    reset() {
-      this.getData();
-    },
-
-    //添加设备
-    addDevice() {
-      console.log("addDevice")
-    },
-
-    /**
-     * 表头文案处理函数
-     * @param arr header数组数据
-     *
-     * @return 处理好的文案
-     */
-    delHeader(arr) {
-      let data = arr.map(item => {
-        if (
-          item.InputMode == "A1" ||
-          item.InputMode == "A2" ||
-          item.InputMode == "B1" ||
-          item.InputMode == "C5" ||
-          item.InputMode == "D1" ||
-          item.InputMode == "D2" ||
-          item.InputMode == "X" ||
-          item.InputMode == "L" ||
-          item.InputMode == "L1" ||
-          item.InputMode == "L2" ||
-          item.InputMode == "F1" ||
-          item.InputMode == "F2"
-        ) {
-          if (item.unit == "") {
-            return item.InfoPointName;
-          } else {
-            return item.InfoPointName + "(" + item.unit + ")";
-          }
-        } else {
-          return undefined;
-        }
-      });
-      data = data.filter(item => item);
-      //   data.unshift("同时创建资产", "所属建筑楼层", "所属系统实例");
-      return data;
-    },
-
-    /**
-     * 表头数据处理函数
-     * @param arr header数组数据
-     *
-     * @return 处理好的数据格式
-     */
-    getType(arr) {
-      let data = arr.map(item => {
-        //二维码
-        if (item.infoPointCode == "EquipQRCode") {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-        //厂商选择
-        if (item.infoPointCode == "Brand" || item.infoPointCode == "Specification") {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-        if (item.infoPointCode == "SupplierContractID") {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-
-        if (item.infoPointCode == "InsuranceNum") {
-          //选择保单
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-
-        if (item.infoPointCode == "InsuranceFile" || item.infoPointCode == "Archive") {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-
-        if (
-          item.infoPointCode == "InstallLocation" ||
-          item.infoPointCode == "InstallPic" ||
-          item.infoPointCode == "InstallDrawing" ||
-          item.infoPointCode == "Nameplate" ||
-          item.infoPointCode == "Pic" ||
-          item.infoPointCode == "Drawing"
-        ) {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-
-        if (
-          item.infoPointCode == "maintainer" ||
-          item.infoPointCode == "Supplier" ||
-          item.infoPointCode == "Insurer" ||
-          item.infoPointCode == "InsurerContactor"
-        ) {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-        if (item.InputMode == "D1") {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.customDropdownRenderer,
-            editor: "chosen",
-            chosenOptions: {
-              // multiple: true,//多选
-              data: item.DataSource || ""
-            }
-          };
-        } else if (item.InputMode == "A1" || item.InputMode == "A2") {
-          return {
-            data: "infos." + item.infoPointCode,
-            type: "numeric",
-            numericFormat: {
-              pattern: "0,0.00"
-              // culture: 'de-DE' // use this for EUR (German),
-              // more cultures available on http://numbrojs.com/languages.html
-            }
-          };
-        } else if (item.InputMode == "C5") {
-          return {
-            data: "infos." + item.infoPointCode,
-            type: "date",
-            dateFormat: "YYYY-MM-DD",
-            correctFormat: true
-          };
-        } else if (
-          item.InputMode == "B1" ||
-          item.InputMode == "L" ||
-          item.InputMode == "L1" ||
-          item.InputMode == "L2"
-        ) {
-          return {
-            data: "infos." + item.infoPointCode
-          };
-        } else if (
-          item.InputMode == "X" ||
-          item.InputMode == "F2"
-          // item.InputMode == "L1" ||
-          // item.InputMode == "L2"
-        ) {
-          return {
-            data: "infos." + item.infoPointCode,
-            readOnly: true
-          };
-        } else if (item.InputMode == "D2") {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.customDropdownRenderer,
-            editor: "chosen",
-            chosenOptions: {
-              multiple: true, //多选
-              data: item.DataSource.Content || ""
-            }
-          };
-        } else {
-          return undefined;
-        }
-
-      });
-      //   data.unshift(
-      //     {
-      //       type: "checkbox",
-      //       checkedTemplate: 1,
-      //       uncheckedTemplate: 0,
-      //       data: "Checked",
-      //       label: {
-      //         position: "after",
-      //       }
-      //     },
-      //     {
-      //       data: "flowBuild",
-      //       renderer: tools.customDropdownRenderer,
-      //       editor: "chosen",
-      //       chosenOptions: {
-      //         // multiple: true,//多选
-      //         // data: item.DataSource.Content || ""
-      //       }
-      //     },
-      //     {
-      //       data: "system",
-      //       renderer: tools.customDropdownRenderer,
-      //       editor: "chosen",
-      //       chosenOptions: {
-      //         // multiple: true,//多选
-      //         // data: item.DataSource.Content || ""
-      //       }
-      //     }
-      //   );
-      data = data.filter(item => item);
-      return data;
-    },
-
-    //初始化插件
-    initHot() {
-      var container = document.getElementById("myHandson");
-      let winHeight = document.documentElement.clientHeight;
-      this.hot = new Handsontable(container, {
-        data: this.main,
-        colHeaders: this.delHeader(this.headers), //表头文案
-        columns: this.getType(this.headers), //数据显示格式
-        filters: true,
-        height: winHeight - 100 - 50 - 60,
-        columnSorting: true, //添加排序
-        sortIndicator: true, //添加排序
-        renderAllRows: true,
-        autoColumnSize: true,
-        language: "zh-CN",
-        manualColumnResize: true,
-        manualColumnMove: true,
-        dropdownMenu: [
-          "filter_by_condition",
-          "filter_by_value",
-          "filter_action_bar"
-        ],
-        contextMenu: this.onlyRead ? false :{
-          items: {
-            remove_row: {
-              name: "删除该业务空间"
-            }
-          }
-        },
-        filters: true,
-        afterFilter: this.trimmedRows,
-        // 事件
-        afterChange: this.tdChange, //修改后
-        afterFilter: this.trimmedRows, //排序前
-        beforeRemoveRow: this.romoveFm, //右键删除
-        afterOnCellMouseDown: this.eventClick //鼠标点击
-      });
-      let pro = document.getElementById("hot-display-license-info");
-      if (!!pro) {
-        pro.parentNode.removeChild(pro);
-      }
-      this.isLoading = false;
-    },
-
-    tdChange() {
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //表格中的点击
-    eventClick(el, rowArr) {
-      console.log(rowArr)
-      //点击的是表头
-      if (rowArr.row < 0) {
-        return;
-      }
-      let filter = this.filtersArr;
-      //被筛选过后的数组
-      let trimmedArr = this.trimmedRows();
-      //是否启用了排序
-      let isSort = this.hot.getPlugin("columnSorting").isSorted();
-      if (trimmedArr.length && isSort) {
-        let sortArr = this.myHotArr.getPlugin("columnSorting").rowsMapper
-          .__arrayMap;
-        let infos = this.main[trimmedArr[sortArr[rowArr.row]]];
-        this.getInfors(infos, sortArr[rowArr.row]);
-      } else if (isSort) {
-        //排序后的数组
-        let sortArr = this.hot.getPlugin("columnSorting").rowsMapper.__arrayMap;
-        let infos = this.main[sortArr[rowArr.row]];
-        this.getInfors(infos, sortArr[rowArr.row]);
-      } else if (trimmedArr.length) {
-        let infos = this.main[trimmedArr[rowArr.row]];
-        this.getInfors(infos, trimmedArr[rowArr.row]);
-      } else {
-        let infos = this.main[rowArr.row];
-        this.getInfors(infos, rowArr);
-      }
-    },
-
-    getInfors(infos, row) {
-      //其他的开始判断
-      let val = this.hot.colToProp(row.col);
-      if (val == "infos.EquipQRCode") {
-        this.myDialog.qrcode = true;
-        this.$refs.qrcode.getCanvas(1111);
-      }
-
-      if (val == "infos.Brand" || val == "infos.Specification") {
-        this.myDialog.firm = true;
-      }
-
-      if (val == "infos.SupplierContractID") {
-        let falg = null
-        if (!!this.main[row.row].infos) {
-          if (!!this.main[row.row].infos) {
-            falg = this.main[row.row].infos.dpSupplierId
-          }
-        }
-        if (!!falg) {
-          this.id = falg
-          this.myDialog.supply = true;
-        } else {
-          this.$message("请先选择供应商")
-        }
-      }
-
-      if (val == "infos.InsuranceNum") {
-        //选择保单
-        this.myDialog.guarantee = true;
-      }
-
-      if (val == "infos.InsuranceFile" || val == "infos.Archive") {
-        this.filesArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? [this.main[row.row].infos[val.split(".")[1]]] : []) : []
-        this.myDialog.uploadFiles = true
-      }
-
-      if (
-        val == "infos.InstallLocation" ||
-        val == "infos.InstallPic" ||
-        val == "infos.InstallDrawing" ||
-        val == "infos.Nameplate" ||
-        val == "infos.Drawing"
-      ) {
-        if (val == "infos.Nameplate") {
-          this.imgsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? [this.main[row.row].infos[val.split(".")[1]].key] : []) : []
-        } else {
-          this.imgsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? [this.main[row.row].infos[val.split(".")[1]]] : []) : []
-        }
-        this.myDialog.uploadImgs = true
-      }
-
-      if (val == "infos.Pic") {
-        // console.log(this.main[row.row].infos[val.split(".")[1]], "this.main[row.row].infos[val.split")
-        this.picsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? this.main[row.row].infos[val.split(".")[1]] : []) : []
-        console.log(this.picsArr)
-        this.myDialog.pic = true
-      }
-
-      if (
-        val == "infos.Supplier"
-      ) {
-        this.myDialog.supplier = true;
-      }
-
-      if (val == "infos.maintainer") {
-        this.myDialog.maintainer = true;
-      }
-
-      if (
-        val == "infos.Insurer" ||
-        val == "infos.InsurerContactor") {
-        this.myDialog.insurer = true;
-      }
-      this.row = row.row
-      this.messKey = val
-      console.log(val, row);
-    },
-
-    //获取被筛选掉的行号
-    trimmedRows() {
-      // var plugin = hot.getPlugin('trimRows').trimmedRows;//获取被筛选掉的行号
-      var plugin = this.hot.getPlugin("trimRows").trimmedRows;
-      let dataLength = this.main.length;
-      let dataArr = new Array();
-      for (let i = 0; i < dataLength; i++) {
-        dataArr.push(i);
-      }
-      if (plugin.length <= 0) {
-        dataArr = undefined;
-      } else {
-        dataArr = this.array_diff(dataArr, plugin);
-      }
-      return dataArr || [];
-      // var DataArray = new Array();
-
-      // for (var i = 0; i < plugin.length; i++) {
-      //     // 通过行号获取数据
-      //     DataArray.push(this.hot.getSourceDataAtRow(plugin[i]));
-      // }
-    },
-
-    //判断是否为空行
-    isEmptyRow(instance, row) {
-      var rowData = instance.countRows();
-      for (var i = 0, ilen = rowData.length; i < ilen; i++) {
-        if (rowData[i] !== null) {
-          return false;
-        }
-      }
-      return true;
-    },
-
-    //如果选择供应商之后
-    supplierChange(data) {
-      console.log(data, "供应商")
-      for (let key in data) {
-        this.utilToKey(key, "name", data, "Supplier")
-        this.utilToKey(key, "email", data, "SupplierEmail")
-        this.utilToKey(key, "website", data, "SupplierWeb")
-        this.utilToKey(key, "phone", data, "SupplierPhone")
-        this.utilToKey(key, "fox", data, "SupplierFax")
-        this.utilToKey(key, "man", data, "SupplierContactor")
-        this.utilToKey(key, "venderId", data, "dpSupplierId")
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //保险商变更
-    changeInsurer(data) {
-      console.log(data, "保险商")
-      for (let key in data) {
-        this.utilToKey(key, "name", data, "Insurer")
-        this.utilToKey(key, "email", data, "InsurerEmail")
-        this.utilToKey(key, "website", data, "InsurerWeb")
-        this.utilToKey(key, "phone", data, "InsurerFax")
-        this.utilToKey(key, "man", data, "InsurerContactor")
-        this.utilToKey(key, "venderId", data, "dpInsurerId")
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //维修商变更
-    changeMaintainer(data) {
-      for (let key in data) {
-        this.utilToKey(key, "name", data, "maintainer")
-        this.utilToKey(key, "email", data, "MaintainerEmail")
-        this.utilToKey(key, "website", data, "MaintainerWeb")
-        this.utilToKey(key, "phone", data, "MaintainerPhone")
-        this.utilToKey(key, "fox", data, "MaintainerFax")
-        this.utilToKey(key, "man", data, "MaintainerContactor")
-        this.utilToKey(key, "venderId", data, "dpMaintainerId")
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    utilToKey(key, name, data, messName) {
-      if (key == name) {
-        this.setDataToMain(data[key], messName, this.row)
-      }
-    },
-
-    //上传文件弹窗触发事件
-    fileChange(keys) {
-      this.setDataToMain(keys[0], this.messKey.split(".")[1], this.row)
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //上传图片弹窗触发事件
-    imgChange(keys) {
-      this.setDataToMain(keys[0], this.messKey.split(".")[1], this.row)
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //设备图片弹窗改变事件
-    changePics(keys) {
-      this.setDataToMain(keys, this.messKey.split(".")[1], this.row)
-      tools.setItem(this.deviceType.code, this.main)
-      console.log("assets", keys)
-    },
-
-    //判断是否有值,有值赋值
-    setDataToMain(data, key, row) {
-      if (!!data && data != '--') {
-        if (!!this.main[row].infos) {
-          //铭牌照片特殊处理
-          if (key == 'Nameplate') {
-            this.main[row].infos[key] = {
-              "systemId": "dataPlatform",
-              "name": "铭牌照片",
-              "type": "image",
-              "key": data
-            }
-          } else {
-            this.main[row].infos[key] = data
-          }
-        } else {
-          this.main[row].infos = {}
-          if (key == 'Nameplate') {
-            this.main[row].infos[key] = {
-              "systemId": "dataPlatform",
-              "name": "铭牌照片",
-              "type": "image",
-              "key": data
-            }
-          } else {
-            this.main[row].infos[key] = data
-          }
-        }
-      } else {
-        this.main[row].infos[key] = ''
-      }
-    }
-  },
-  watch: {
-    dialog: {
-      deep: true,
-      handler(newName, oldName) {
-        // this.getData()
-        console.log(this.dialog)
-        if (this.dialog.addDevice) {
-          this.getData()
-        }
-      },
-    }
-  }
-};
-</script>
-<style lang="less" scoped>
-#addDevice {
-  overflow: hidden;
-}
-</style>

+ 0 - 848
src/components/dialogs/addDialog/dialogAssets.vue

@@ -1,848 +0,0 @@
-<!--
-    上传文件的弹窗
--->
-
-<template>
-  <div v-if="dialog.addDevice">
-    <el-dialog
-      :title="title"
-      :center="isCenter"
-      :visible.sync="dialog.addDevice"
-      :width="width"
-      :fullscreen="isFull"
-    >
-      <div id="addDevice">
-        <div v-show="!isCenter">
-          <my-cascader ref="cascader" @change="changeCader"></my-cascader>
-        </div>
-        <div v-if="isCenter">
-          <div>
-            <div class="hanson-bar">
-              <span>当前选择的设备族:{{ deviceType.facility }}</span>
-              <div style="width:350px;float:right;overflow:hidden;">
-                <span>增加</span>
-                <el-input v-model="addNum" style="width:50px;" placeholder="增加个数" size="small"></el-input>
-                <span>个{{ deviceType.facility }}</span>
-                <el-button size="small" @click="addMain">增加</el-button>
-              </div>
-              <div
-                style="width:200px;color:gray;float:right;padding-top:7px;font-size:10px;"
-              >是否隐藏自动填充信息点:
-                <el-tooltip :content="'' + (isWatch ? '隐藏' : '不隐藏')" placement="top">
-                  <el-switch
-                    @change="changeWatch"
-                    v-model="isWatch"
-                    active-color="#13ce66"
-                    inactive-color="gray"
-                  ></el-switch>
-                </el-tooltip>
-              </div>
-            </div>
-            <div v-show="main && main.length" id="myHandson" ref="myHandson"></div>
-          </div>
-        </div>
-      </div>
-      <div v-show="!isCenter" slot="footer" class="dialog-footer">
-        <el-button>取 消</el-button>
-        <el-button type="primary" @click="step(1)">下 一 步</el-button>
-      </div>
-      <span v-show="isCenter" slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="createAssets">创建资产</el-button>
-      </span>
-    </el-dialog>
-    <qrcode :dialog="myDialog" :addBody="true" ref="qrcode"></qrcode>
-    <firm
-      :mess="{deviceId : deviceType.code}"
-      ref="firm"
-      @changeFirm="firmChange"
-      :dialog="myDialog"
-    ></firm>
-    <supply-dialog @change="supplyChange" :id="id" ref="supply" :dialog="myDialog"></supply-dialog>
-    <supplier-dialog ref="supplier" @changeSupplier="supplierChange" :dialog="myDialog"></supplier-dialog>
-    <guarantee-dialog ref="guarantee" :id="id" @change="guaranteeChange" :dialog="myDialog"></guarantee-dialog>
-    <upload-files-dialog
-      ref="upload"
-      @changeFile="fileChange"
-      :keysArr="filesArr"
-      :dialog="myDialog"
-    ></upload-files-dialog>
-    <upload-img-dialog @changeFile="imgChange" :keysArr="imgsArr" :dialog="myDialog"></upload-img-dialog>
-    <maintainer-dialog @changeMaintainer="changeMaintainer" ref="maintainer" :dialog="myDialog"></maintainer-dialog>
-    <insurer-dialog @changeInsurer="changeInsurer" ref="insurer" :dialog="myDialog"></insurer-dialog>
-    <pic-dialog :dialog="myDialog" :keysArr="picsArr" @change="changePics"></pic-dialog>
-  </div>
-</template>
-<script>
-
-import myCascader from "@/components/lib/cascaders/assets";
-import hansonTable from "@/components/dialogHanson/addDevice";
-import tools from "@/utils/scan/tools";
-import qrcode from "@/components/ledger/lib/qrcode";
-import firm from "@/components/dialogs/list/firm";
-import supplyDialog from "@/components/dialogs/list/supplyDialog";
-import supplierDialog from "@/components/dialogs/list/supplierDialog";
-import maintainerDialog from "@/components/dialogs/list/maintainerDialog";
-import insurerDialog from "@/components/dialogs/list/insurerDialog";
-import guaranteeDialog from "@/components/dialogs/list/guaranteeDialog";
-import uploadFilesDialog from "@/components/dialogs/list/filesDialog";
-import uploadImgDialog from "@/components/dialogs/list/uploadImgDialog";
-import picDialog from "@/components/dialogs/list/picDialog"
-
-//下拉插件
-import "@/assets/js/chosen.jquery.min";
-import "@/assets/js/handsontable-chosen-editor";
-
-import text from "@/utils/handsontable/mainText"
-
-import showTools from "@/utils/handsontable/notShow"
-
-import uuid from "@/utils/uuid";
-import { mapGetters, mapActions } from "vuex";
-import { getTableHeader, createProperty, getSpaceFloor, createAssetsList } from "@/api/scan/request";
-
-let table = function (num) {
-  let main = []
-  for (let i = 0; i < num; i++) {
-    main.push({})
-  }
-  return main
-}
-export default {
-  components: {
-    myCascader,
-    hansonTable,
-    qrcode, //二维码页面
-    firm, //
-    supplyDialog,
-    supplierDialog,
-    guaranteeDialog,
-    uploadFilesDialog,
-    maintainerDialog,
-    insurerDialog,
-    uploadImgDialog,
-    picDialog
-  },
-  props: {
-    dialog: {
-      type: Object,
-      default: function () {
-        return {
-          addDevice: false
-        };
-      }
-    },
-    assetType: {
-      type: Array,
-      default: function () {
-        return []
-      }
-    }
-  },
-  data() {
-    return {
-      width: "30%",
-      isFull: false,//dialog是否为全屏
-      title: "确定新增资产的类型",
-      isCenter: false,
-      deviceType: {},
-      main: table(1),
-      mess: {},
-      headers: null,
-      page: {
-        size: 50,
-        sizes: [10, 30, 50, 100, 150, 200],
-        total: 400,
-        currentPage: 1
-      },
-      id: 0,
-      myDialog: {
-        qrcode: false, //二维码弹窗
-        firm: false, //厂商弹窗
-        supply: false, //选择供应合同
-        supplier: false, //供应商选择
-        guarantee: false, //选择保单
-        maintainer: false, //选择维修商
-        insurer: false, //选择保险公司
-        uploadFiles: false,//上传文件
-        uploadImgs: false,//上传单个图片
-        pic: false, //多个图片
-      },
-      addNum: 1,//增加个数
-      row: null,//被修改的row
-      filesArr: [],//保存临时的文件key
-      messKey: null,
-      imgsArr: [],//临时保存的图片key数组
-      picsArr: [],//临时设备图片keys数组
-      param: {
-        ProjId: "",
-        secret: ""
-      },
-      floorData: [],
-      isWatch: true,
-      ajaxResult: true
-    };
-  },
-  computed: {
-    ...mapGetters("layout", [
-      "projectId",
-      "secret",
-      "userId"
-    ])
-  },
-  created() {
-    this.param.ProjId = this.projectId
-    this.param.secret = this.secret
-    // this.getFloorData()
-  },
-  mounted() {
-  },
-  methods: {
-    //设置默认选中数据
-    setValue() {
-      this.$nextTick(_ => {
-        this.$refs.cascader.setValue(this.assetType)
-      })
-    },
-    //获取楼层数据
-    // getFloorData() {  // 物理世界 已无接口
-    //   getSpaceFloor(this.param).then(res => {
-    //     if (res.data.Result == 'success') {
-    //       let data = this.changeArr(res.data.Content), floorData = []
-    //       data.map(item => {
-    //         if (!!item.children) {
-    //           item.children.unshift({
-    //             value: '',
-    //             label: "未明确楼层的设备"
-    //           })
-    //         }
-    //         return item
-    //       })
-    //       data.map(item => {
-    //         if (!!item.children && item.children.length) {
-    //           item.children.map(child => {
-    //             floorData.push({
-    //               Code: item.value + "-" + child.value,
-    //               Name: item.label + "-" + child.label
-    //             })
-    //           })
-    //         }
-    //       })
-    //       this.floorData = floorData
-    //       //   this.options = data
-    //     } else {
-    //       this.$message.error(res.data.ResultMsg)
-    //     }
-    //   }).catch(() => {
-    //     this.$message.error("请求出错")
-    //   })
-    // },
-    //将数组转换成optiosn格式
-    changeArr(arr) {
-      return arr.map(item => {
-        if (item.floors && item.floors.length) {
-          return {
-            value: item.id,
-            label: item.infos.BuildLocalName,
-            children: item.floors.map(i => {
-              return {
-                value: i.id,
-                label: i.infos.FloorLocalName || "未知",
-              }
-            })
-          }
-        } else {
-          return {
-            value: item.id,
-            label: item.infos.BuildLocalName,
-            children: null,
-            isChilren: 1,
-          }
-        }
-      })
-    },
-
-    //增加个数
-    addMain() {
-      for (let i = 0; i < this.addNum; i++) {
-        this.main.push({})
-      }
-      if (!!this.hot) {
-        this.hot.destroy()
-      }
-      this.initHot()
-    },
-
-    //下一步
-    step(val) {
-      if (!!val) {
-        this.isFull = true
-        this.isCenter = true
-        this.title = "添加资产"
-        this.getData()
-      } else {
-        this.isFull = false
-        this.isCenter = false
-      }
-    },
-    //修改设备类型
-    changeCader(val) {
-      this.deviceType = val
-    },
-    //获取header的mess
-    getHeader(mess) {
-      this.mess = mess;
-    },
-
-    //获取主体内容
-    getMain(floorMess) {
-    },
-
-    //获取表头
-    getData() {
-      this.main = table(1)
-      getTableHeader({
-        code: this.deviceType.code,
-        ProjId: this.projectId
-      }).then(res => {
-        this.headers = res.data.Content;
-        if (!!this.hot) {
-          this.hot.destroy();
-          this.hot = null;
-        }
-        let data = tools.getItem(this.deviceType.code)
-        if (!!data) {
-          this.main = data
-        }
-        this.initHot();
-      });
-    },
-
-    changeWatch() {
-      this.getData()
-    },
-
-    //撤回
-    undo() {
-      this.hot.undo();
-    },
-
-    //刷新
-    reset() {
-      this.getData();
-    },
-
-    //添加设备
-    addDevice() {
-    },
-
-    //创建资产
-    createAssets() {
-      let data = []
-      let copyData = tools.copyArr(this.main)
-      let falg = false
-      copyData.map(item => {
-        if (!!item.infos) {
-          if (item.infos.EquipLocalName) {
-            item.family = this.deviceType.code
-            data.push(item)
-          } else {
-            falg = true
-          }
-        }
-      })
-      if (falg) {
-        this.$message.error("存在资产的本地名称为空,请检查")
-        return
-      }
-      let params = []
-      data.map(item => {
-        if (!!item.infos) {
-          let one = {}
-          if (!!item.flowBuild) {
-            one.BuildId = item.flowBuild.split("-")[0]
-            one.FloorId = item.flowBuild.split("-")[1] || null
-          }
-          one.Family = this.deviceType.code
-          one.FamilyName = this.deviceType.facility
-          one.Infos = item.infos
-          one.FmId = "Pe" + uuid(32, 16)
-          one.ProjId = this.projectId
-          one.FmName = item.infos.EquipLocalName || ""
-          one.X = 0
-          one.Y = 0
-          params.push(one)
-        }
-      })
-      params.map(item => {
-        for (let k in item.Infos) {
-          if (item.Infos[k] == "") {
-            item.Infos[k] = null
-          }
-        }
-      })
-      if (params.length) {
-        this.createJson(params)
-      } else {
-        this.$message.error("信息点不能为空")
-      }
-    },
-
-    //新建资产请求
-    async createJson(data) {
-      data.map(item => {
-        if (!!item.Infos.dpSupplierId) {
-          item.Infos.dpSupplierId = item.Infos.dpSupplierId.split("-")[0]
-        }
-        if (!!item.Infos.dpManufacturerId) {
-          item.Infos.dpManufacturerId = item.Infos.dpManufacturerId.split("-")[0]
-        }
-        if (!!item.Infos.dpInsurerId) {
-          item.Infos.dpInsurerId = item.Infos.dpInsurerId.split("-")[0]
-        }
-        if (!!item.Infos.dpMaintainerId) {
-          item.Infos.dpMaintainerId = item.Infos.dpMaintainerId.split("-")[0]
-        }
-        if (!!item.Infos.dpSpecificationId) {
-          item.Infos.dpSpecificationId = item.Infos.dpSpecificationId.split("-")[0]
-        }
-        for (let k in item.Infos) {
-          if (item.Infos[k] == "") {
-            item.Infos[k] = null
-          }
-        }
-        return item
-      })
-      this.ajaxResult = true
-      let param = {
-        FmList: data,
-        ProjId: this.projectId,
-        UserId: this.userId
-      }
-      await this.createAssetId(param)
-    },
-
-    async createAssetId(param) {
-      await createAssetsList(param, res => {
-        console.log(res)
-        if (res.Result != "success") {
-          this.$message.error("请求错误")
-        } else {
-          tools.removeItem(this.deviceType.code)
-          this.$emit("close", this.deviceType)
-          this.dialog.addDevice = false
-        }
-      })
-    },
-
-    /**
-     * 表头文案处理函数
-     * @param list header数组数据
-     *
-     * @return 处理好的文案
-     */
-    delHeader(list) {
-      let arr = tools.copyArr(list)
-      // 如果不是只读状态,添加四大厂商选择
-      arr = showTools.arrToArr(arr)
-      let readArr = ["A1", "A2", "B1", "C5", "D1", "D2", "X", "L", "L1", "L2", "F1", "F2", "M"]
-      readArr.push("Own")
-      let data = showTools.changeHeader(arr, readArr, false, this.isWatch, false, true)
-      data.unshift("所属建筑楼层");
-      console.log(data, "data")
-      return data;
-    },
-
-    /**
-     * 表头数据处理函数
-     * @param list header数组数据
-     *
-     * @return 处理好的数据格式
-     */
-    getType(list) {
-      let arr = tools.copyArr(list)
-      // 如果不是只读状态,添加四大厂商选择
-      if (!this.onlyRead) {
-        arr = showTools.arrToArr(arr)
-      }
-      let data = showTools.showTypes(arr, false, this.isWatch, false, true)
-      data.unshift(
-        {
-          data: "flowBuild",
-          renderer: tools.customDropdownRenderer,
-          editor: "chosen",
-          chosenOptions: {
-            data: this.floorData
-          }
-        }
-      );
-      console.log("type", data)
-      return data;
-    },
-
-
-    //初始化插件
-    initHot() {
-      var container = document.getElementById("myHandson");
-      let winHeight = document.documentElement.clientHeight;
-      this.hot = new Handsontable(container, {
-        data: this.main,
-        colHeaders: this.delHeader(this.headers), //表头文案
-        columns: this.getType(this.headers), //数据显示格式
-        filters: true,
-        rowHeaders: true,
-        height: winHeight - 100 - 50 - 60,
-        columnSorting: true, //添加排序
-        sortIndicator: true, //添加排序
-        renderAllRows: true,
-        autoColumnSize: true,
-        language: "zh-CN",
-        maxRows: this.main.length,
-        manualColumnResize: true,
-        manualColumnMove: true,
-        dropdownMenu: [
-          "filter_by_condition",
-          "filter_by_value",
-          "filter_action_bar"
-        ],
-        contextMenu: this.onlyRead ? false : {
-          items: {
-            remove_row: {
-              name: "删除该资产"
-            }
-          }
-        },
-        afterChange: this.tdChange, //修改后
-        afterFilter: this.trimmedRows, //排序前
-        afterRemoveRow: this.romoveFm, //右键删除
-        afterOnCellMouseDown: this.eventClick //鼠标点击
-      });
-      let pro = document.getElementById("hot-display-license-info");
-      if (!!pro) {
-        pro.parentNode.removeChild(pro);
-      }
-      this.isLoading = false;
-    },
-
-    tdChange() {
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //表格中的点击
-    eventClick(el, rowArr) {
-      //点击的是表头
-      if (rowArr.row < 0) {
-        return;
-      }
-      let filter = this.filtersArr;
-      //被筛选过后的数组
-      let trimmedArr = this.trimmedRows();
-      //是否启用了排序
-      let isSort = this.hot.getPlugin("columnSorting").isSorted();
-      if (trimmedArr.length && isSort) {
-        let sortArr = this.myHotArr.getPlugin("columnSorting").rowsMapper
-          .__arrayMap;
-        let infos = this.main[trimmedArr[sortArr[rowArr.row]]];
-        this.getInfors(infos, sortArr[rowArr.row]);
-      } else if (isSort) {
-        //排序后的数组
-        let sortArr = this.hot.getPlugin("columnSorting").rowsMapper.__arrayMap;
-        let infos = this.main[sortArr[rowArr.row]];
-        this.getInfors(infos, sortArr[rowArr.row]);
-      } else if (trimmedArr.length) {
-        let infos = this.main[trimmedArr[rowArr.row]];
-        this.getInfors(infos, trimmedArr[rowArr.row]);
-      } else {
-        let infos = this.main[rowArr.row];
-        this.getInfors(infos, rowArr);
-      }
-    },
-
-    getInfors(infos, row) {
-      //其他的开始判断
-      let val = this.hot.colToProp(row.col);
-      if (val == "infos.EquipQRCode") {
-        this.myDialog.qrcode = true;
-        this.$refs.qrcode.getCanvas(1111);
-      }
-
-      if (val == "linkSystem") {
-        this.systemList = this.main[row.row].linkSystem || []
-        this.dialog.systemType = true
-      }
-
-      if (val == "infos.dpManufacturerId") {
-        this.myDialog.firm = true;
-      }
-
-      if (val == "infos.SupplierContractID") {
-        let falg = null
-        if (!!this.main[row.row].infos) {
-          if (!!this.main[row.row].infos) {
-            falg = this.main[row.row].infos.dpSupplierId.split("-")[0]
-          }
-        }
-        if (!!falg) {
-          this.id = falg
-          this.myDialog.supply = true;
-        } else {
-          this.$message("请先选择供应商")
-        }
-      }
-
-      if (val == "infos.InsuranceNum") {
-        //选择保单
-        let falg = null
-        if (!!this.main[row.row].infos) {
-          if (!!this.main[row.row].infos) {
-            falg = this.main[row.row].infos.dpInsurerId.split("-")[0]
-          }
-        }
-        if (!!falg) {
-          this.id = falg
-          this.myDialog.guarantee = true;
-        } else {
-          this.$message("请先选择保险商")
-        }
-      }
-
-      if (val == "infos.InsuranceFile" || val == "infos.Archive") {
-        this.filesArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? [this.main[row.row].infos[val.split(".")[1]]] : []) : []
-        this.myDialog.uploadFiles = true
-      }
-
-      if (
-        val == "infos.InstallPic" ||
-        val == "infos.InstallDrawing" ||
-        val == "infos.Nameplate" ||
-        val == "infos.Drawing"
-      ) {
-        if (val == "infos.Nameplate") {
-          this.imgsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? [this.main[row.row].infos[val.split(".")[1]].key] : []) : []
-        } else {
-          this.imgsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? [this.main[row.row].infos[val.split(".")[1]]] : []) : []
-        }
-        this.myDialog.uploadImgs = true
-      }
-
-      if (val == "infos.Pic") {
-        this.picsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? this.main[row.row].infos[val.split(".")[1]] : []) : []
-        this.myDialog.pic = true
-      }
-
-      if (
-        val == "infos.Supplier"
-      ) {
-        this.myDialog.supplier = true;
-      }
-
-      if (
-        val == "infos.dpSupplierId"
-      ) {
-        this.myDialog.supplier = true;
-      }
-
-      if (val == "infos.dpMaintainerId"
-      ) {
-        this.myDialog.maintainer = true;
-      }
-
-      if (
-        val == "infos.dpInsurerId"
-      ) {
-        this.myDialog.insurer = true;
-      }
-
-      if (val == "infos.maintainer") {
-        this.myDialog.maintainer = true;
-      }
-
-      if (
-        val == "infos.Insurer" ||
-        val == "infos.InsurerContactor") {
-        this.myDialog.insurer = true;
-      }
-      this.row = row.row
-      this.messKey = val
-      console.log(val, row);
-    },
-
-    //获取被筛选掉的行号
-    trimmedRows() {
-      // var plugin = hot.getPlugin('trimRows').trimmedRows;//获取被筛选掉的行号
-      var plugin = this.hot.getPlugin("trimRows").trimmedRows;
-      let dataLength = this.main.length;
-      let dataArr = new Array();
-      for (let i = 0; i < dataLength; i++) {
-        dataArr.push(i);
-      }
-      if (plugin.length <= 0) {
-        dataArr = undefined;
-      } else {
-        dataArr = this.array_diff(dataArr, plugin);
-      }
-      return dataArr || [];
-      // var DataArray = new Array();
-
-      // for (var i = 0; i < plugin.length; i++) {
-      //     // 通过行号获取数据
-      //     DataArray.push(this.hot.getSourceDataAtRow(plugin[i]));
-      // }
-    },
-
-    //判断是否为空行
-    isEmptyRow(instance, row) {
-      var rowData = instance.countRows();
-      for (var i = 0, ilen = rowData.length; i < ilen; i++) {
-        if (rowData[i] !== null) {
-          return false;
-        }
-      }
-      return true;
-    },
-
-    //选择型号修改
-    firmChange(data) {
-      for (let key in data) {
-        // this.utilToKey(key, "brand", data, "Brand")
-        // this.utilToKey(key, "name", data, "Specification")
-        // this.utilToKey(key, "venderName", data, "manufacturer")
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name + "/" + data.brand
-          this.utilToKey(key, "venderId", data, "dpManufacturerId")
-        }
-        this.utilToKey(key, "specificationId", data, "dpSpecificationId")
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //如果选择供应商之后
-    supplierChange(data) {
-      for (let key in data) {
-        // this.utilToKey(key, "name", data, "Supplier")
-        // this.utilToKey(key, "email", data, "SupplierEmail")
-        // this.utilToKey(key, "website", data, "SupplierWeb")
-        // this.utilToKey(key, "phone", data, "SupplierPhone")
-        // this.utilToKey(key, "fox", data, "SupplierFax")
-        // this.utilToKey(key, "man", data, "SupplierContactor")
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name
-          console.log(data)
-          this.utilToKey(key, "venderId", data, "dpSupplierId")
-        }
-        // this.utilToKey(key, "specificationId", data, "dpSpecificationId")
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //供应商合同
-    supplyChange(data) {
-      let changeData = { id: data }
-      this.utilToKey("id", "id", changeData, "SupplierContractID")
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //保险合同
-    guaranteeChange(data) {
-      for (let key in data) {
-        this.utilToKey(key, "insuranceNo", data, "InsuranceNum")
-        if (key == "contractFile") {
-          if (!!data[key]) {
-            data[key] = [data[key]]
-          }
-        }
-        this.utilToKey(key, "contractFile", data, "InsuranceFile")
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //保险商变更
-    changeInsurer(data) {
-      for (let key in data) {
-        // this.utilToKey(key, "name", data, "Insurer")
-        // this.utilToKey(key, "email", data, "InsurerEmail")
-        // this.utilToKey(key, "website", data, "InsurerWeb")
-        // this.utilToKey(key, "phone", data, "InsurerFax")
-        // this.utilToKey(key, "man", data, "InsurerContactor")
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name
-          this.utilToKey(key, "venderId", data, "dpInsurerId")
-        }
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //维修商变更
-    changeMaintainer(data) {
-      for (let key in data) {
-        // this.utilToKey(key, "name", data, "maintainer")
-        // this.utilToKey(key, "email", data, "MaintainerEmail")
-        // this.utilToKey(key, "website", data, "MaintainerWeb")
-        // this.utilToKey(key, "phone", data, "MaintainerPhone")
-        // this.utilToKey(key, "fox", data, "MaintainerFax")
-        // this.utilToKey(key, "man", data, "MaintainerContactor")
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name
-          this.utilToKey(key, "venderId", data, "dpMaintainerId")
-        }
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    utilToKey(key, name, data, messName) {
-      if (key == name) {
-        this.setDataToMain(data[key], messName, this.row)
-      }
-    },
-
-    //上传文件弹窗触发事件
-    fileChange(keys) {
-      this.setDataToMain(keys[0], this.messKey.split("."), this.row)
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //上传图片弹窗触发事件
-    imgChange(keys) {
-      console.log(keys, "keys", this.messKey.split("."), this.row, '22222222222222')
-      this.setDataToMain(keys[0], this.messKey.split("."), this.row)
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //设备图片弹窗改变事件
-    changePics(keys) {
-      console.log(keys, "keys", this.messKey.split("."), this.row, '22222222222222')
-      this.setDataToMain(keys, this.messKey.split("."), this.row)
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //判断是否有值,有值赋值
-    setDataToMain(data, key, row) {
-      if (!!data && data != '--') {
-        if (!!this.main[row].infos) {
-          //铭牌照片特殊处理
-          this.main[row].infos[key] = data
-        } else {
-          this.main[row].infos = {}
-          this.main[row].infos[key] = data
-        }
-      } else {
-        this.main[row].infos[key] = ''
-      }
-    }
-  },
-  watch: {
-    dialog: {
-      deep: true,
-      handler: function () {
-        if (this.dialog.addDevice) {
-          this.setValue()
-        }
-      }
-    }
-  }
-};
-</script>
-<style lang="less" scoped>
-#addDevice {
-  overflow: hidden;
-}
-</style>

+ 5 - 5
src/components/dialogs/changeRea.vue

@@ -16,15 +16,15 @@
         </div> -->
         <el-radio-group v-model="radio" style="width:100%;">
           <el-table :data="tableData" style="width: 100%" height="300px">
-            <el-table-column label="资产名称">
+            <el-table-column label="资产名称" show-overflow-tooltip>
               <template slot-scope="scope">
                 <el-radio :label="scope.row.id" :ref="scope.row.id" :value="scope.row.localName || scope.row.name">
-                  {{ scope.row.localName || scope.row.name }}
+                  {{ scope.row.localName }}
                 </el-radio>
               </template>
             </el-table-column>
             <el-table-column label="本地编码">
-              <template slot-scope="scope">{{ scope.row.localId || scope.row.id }}</template>
+              <template slot-scope="scope">{{ scope.row.localId }}</template>
             </el-table-column>
             <el-table-column prop="name" label="所在楼层">
               <template slot-scope="scope">
@@ -40,7 +40,7 @@
             </el-table-column>
             <el-table-column label="安装位置">
               <template slot-scope="scope">
-                {{ scope.row.infos ? scope.row.infos.InstallLocation ? scope.row.infos.InstallLocation : "--" : "--" }}
+                {{ scope.row.infos ? scope.row.infos.installLocation ? scope.row.infos.installLocation : "--" : "--" }}
               </template>
             </el-table-column>
           </el-table>
@@ -169,7 +169,7 @@ export default {
       }
       //名称和编码
       if (this.search) {
-        param.filters += `;localName contain '${this.search}' || localId contain '${this.search}'`
+        param.filters += `;name contain '${this.search}' || localName contain '${this.search}' || localId contain '${this.search}'`
       }
       queryProperty(param, res => {
         this.tableData = res.content

+ 134 - 44
src/components/dialogs/list/batchDialog.vue

@@ -22,32 +22,32 @@
       v-show="active === 0"
       style="overflow: hidden"
     >
-      <section>
-        <p class="text-message">维护只有单值的信息点</p>
-        <span class="small">请选择需维护的信息点</span>
-        <el-checkbox
-          :indeterminate="isIndeterminate"
-          v-model="checkAll"
-          @change="handleCheckChange"
-        >
-          全部选择
-        </el-checkbox>
+      <!--      <section>-->
+      <!--        <p class="text-message">维护只有单值的信息点</p>-->
+      <!--        <span class="small">请选择需维护的信息点</span>-->
+      <!--        <el-checkbox-->
+      <!--          :indeterminate="isIndeterminate"-->
+      <!--          v-model="checkAll"-->
+      <!--          @change="handleCheckChange"-->
+      <!--        >-->
+      <!--          全部选择-->
+      <!--        </el-checkbox>-->
 
-        <div style="margin: 15px "></div>
-        <el-checkbox-group
-          v-model="checkedCities"
-          @change="handleCheckedCitiesChange"
-        >
-          <el-checkbox
-            v-for="(city,index) in newFirm"
-            :label="city"
-            :key="index"
-          >
-            <span @click="fourVendors(city.code)"> {{ city.name }}:</span>
-            <span :title="city.rname">{{ city.rname | filterImgNames }}</span>
-          </el-checkbox>
-        </el-checkbox-group>
-      </section>
+      <!--        <div style="margin: 15px "></div>-->
+      <!--        <el-checkbox-group-->
+      <!--          v-model="checkedCities"-->
+      <!--          @change="handleCheckedCitiesChange"-->
+      <!--        >-->
+      <!--          <el-checkbox-->
+      <!--            v-for="(city,index) in newFirm"-->
+      <!--            :label="city"-->
+      <!--            :key="index"-->
+      <!--          >-->
+      <!--            <span @click="fourVendors(city.code)"> {{ city.name }}:</span>-->
+      <!--            <span :title="city.rname">{{ city.rname | filterImgNames }}</span>-->
+      <!--          </el-checkbox>-->
+      <!--        </el-checkbox-group>-->
+      <!--      </section>-->
       <!--维护有多个值的信息-->
       <section>
         <p class="text-message">维护有多个值的信息点</p>
@@ -63,12 +63,14 @@
         <div class="checkbox">
           <p v-for="(item,index) in newEnclosure">
             <el-checkbox v-model="form[item.path]">
-              <span @click="multiple(item.path)" style="cursor: pointer">{{ item.name }}</span>
-              <span
-                class="text-color"
-                v-for="i in item.value"
-              >{{ i.Name | filterImgName }}</span>
             </el-checkbox>
+            <span style="cursor: pointer">{{ item.name }}</span>
+            <el-button @click="multiple(item.path)" type="text">请选择</el-button>
+            <span
+              class="text-color"
+              v-for="i in item.value"
+            >{{ i.name | filterImgName }}</span>
+
           </p>
         </div>
 
@@ -119,6 +121,7 @@
 
       <el-button
         type="primary"
+        :loading="loading"
         @click="maintenanceSelect"
         style="margin-top:10px"
       >维护已选
@@ -133,7 +136,8 @@
 </template>
 
 <script>
-import myPagination from "@/components/ledger/lib/myPagination"
+import myPagination from "@/components/ledger/lib/myPagination";
+import { queryUpdate, updateEquip } from "@/api/scan/request";
 import tools from "@/utils/buildfloor/tools";
 
 export default {
@@ -144,6 +148,7 @@ export default {
     return {
       form: {},
       batchDialog: false,//dialog
+      loading: false, //批量维护加载状态
       active: 0,//进度条
       checkAll: false,//全选
       isIndeterminate: true,
@@ -313,14 +318,13 @@ export default {
         });
         return false
       }
+
       let arr = []
       // dpSupplierId 供应商 dpManufacturerId 生产商 dpBrandId 品牌
       // dpSpecificationId 型号 dpInsurerId 保险商 dpMaintainerId 维修商
       this.multipleSelection.forEach(item => {
-        // let equipId = item.id
-        // arr.push({ equipId })
         let id = item.id
-        arr.push({ id })
+        arr.push({id})
       })
 
       let Id = {}
@@ -385,27 +389,26 @@ export default {
             insuranceFile: file
           }
         }
-
       }
-
       // this.information 多选信息
       let valuable = [], newValuable = []
-      valuable = this.newEnclosure.filter(i => this.form[i.path] && i.value).forEach(({ code, value }) => newValuable[code] = value);
-      // console.log( newValuable,'多选信息')
+
+      valuable = this.newEnclosure.filter(i => this.form[i.path] && i.value).forEach(({code, value}) => newValuable[code] = value);
+      console.log(newValuable, '多选信息', valuable)
+
       if (this.radio === 1) { //组装数据,根据是覆盖该是增量,1是增量
         //    1:单选数据
         let arr1 = this.deepCopy(arr).map(item => ({
           ...Id,
           ...item,
-          infos: { ...equipManufactor, ...supplyPurchase, ...operationMainte, ...insuranceDoc }
+          infos: {...equipManufactor, ...supplyPurchase, ...operationMainte, ...insuranceDoc}
         }))
         let arr2 = this.deepCopy(arr).map(item => ({
           ...item,
           ...newValuable
         }))
-        this.$emit('upDataDevice', 1, arr1, arr2)
-      }
-      if (this.radio === 2) {
+        this.upDataDevice(1, arr1, arr2);
+      } else if (this.radio === 2) {
         let param = {}, singleList = {}
         this.newEnclosure.forEach(({ path, value }) => param[path] = value)
         singleList.infos = { ...equipManufactor, ...supplyPurchase, ...operationMainte, ...insuranceDoc }
@@ -417,9 +420,96 @@ export default {
           ...pa,
 
         }))
-        this.$emit('upDataDevice', 2, arr3)
+        this.upDataDevice(2, arr3);
+      } else {
+          this.closeDialog()
+      }
+    },
+    upDataDevice(type, data1, data2) {
+      this.loading = true;
+      let param = {content: data1};
+      let param1 = {content: data2};
+      if (type === 1) {
+        //增量
+        //LedgerParam
+        let filterParam = this.filterCheck(param, "sole");
+        let filterParam1 = this.filterCheck(param1, "multiple");
+        if (filterParam) {
+          updateEquip(param, res => {
+            if (res.result === "success") {
+                this.loading = false;
+                this.$emit('upDataDevice')
+            } else {
+                this.$message.error(res.message);
+            }
+            this.closeDialog();
+          });
+        }
+        if (filterParam1) {
+          param1.content.map(i => {
+            i.equipId = i.id
+            delete i.id
+            return i
+          })
+          setTimeout(() => {
+            queryUpdate(param1, res => {
+                if (res.result === "success") {
+                    this.loading = false;
+                    this.$emit('upDataDevice')
+                } else {
+                    this.$message.error(res.message);
+                }
+                this.closeDialog();
+            });
+          });
+        } else {
+            this.loading = false;
+            this.closeDialog();
+        }
+      } else if (type === 2) {
+        //覆盖
+        let filterParams = this.filterCheck(param, "sole");
+        if (filterParams) {
+          updateEquip(param, res => {
+            if (res.result === "success") {
+                this.loading = false;
+                this.$emit('upDataDevice')
+            } else {
+                this.$message.error(res.message);
+            }
+            this.closeDialog();
+          });
+        } else {
+            this.loading = false;
+            this.closeDialog();
+        }
+      }
+    },
+    filterCheck(arr, type) {
+      if (type === "sole") {
+        for (let i of arr.content) {
+          for (let j in i.infos) {
+            if (Array.isArray(i.infos[j]) && i.infos[j].length < 1) {
+              delete i.infos[j]
+            }
+          }
+          return Object.keys(i.infos).length;
+        }
+      } else if (type === "multiple") {
+        let nArr = [];
+        arr.content.forEach(i => {
+          let {id, ...value} = i;
+          nArr.push({infos: value});
+        });
+        // nArr.map(i => {
+        //   if (Array.isArray(i) && i.length < 1) {
+        //     console.log(i)
+        //   }
+        // })
+        for (let j of nArr) {
+          return Object.keys(j.infos).length;
+        }
       }
-      this.closeDialog()
     },
     closeDialog() {  //关闭弹窗,返回初始状态
       this.batchDialog = false

+ 6 - 0
src/components/dialogs/list/filesDialog.vue

@@ -121,6 +121,12 @@ export default {
           case 'infos.supplierContract': //供应合同
             this.$emit("changeFile", info, this.firmDataType, file)
             break
+          case 'infos.designIDGraph': //安装图纸
+            this.$emit("changeFile", info, this.firmDataType, file)
+            break
+          case 'infos.fanCharacterCurve': //供应合同
+            this.$emit("changeFile", info, this.firmDataType, file)
+            break
         }
       } else {
         this.$emit("changeFile", file, this.firmDataType)

+ 6 - 26
src/components/dialogs/list/insurerDialog.vue

@@ -26,10 +26,10 @@
               </template>
             </el-table-column>
             <el-table-column header-align='center' prop="website" label="网址"></el-table-column>
-            <el-table-column header-align='center' prop="man" label="联系人"></el-table-column>
-            <el-table-column header-align='center' prop="phone" label="联系电话"></el-table-column>
-            <el-table-column header-align='center' prop="faxes" label="传真"></el-table-column>
-            <el-table-column header-align='center' prop="email" label="电子邮件"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].name" label="联系人"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].phone" label="联系电话"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].fax" label="传真"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].email" label="电子邮件"></el-table-column>
           </el-table>
         </el-radio-group>
         <div class="right" style="background: #fff;">
@@ -114,29 +114,9 @@
                 }
                 getLib({"type": ["insurance"]}).then(res => {
                     if (res.data.result == "success") {
-                        let data = res.data.content.insurance.map(item => {
-                            if (item.contacts && item.contacts.length) {
-                                item.contacts.map(child => {
-                                    if (child.projectId == this.projectId) {
-                                        item.phone = child.phone
-                                        item.man = child.name
-                                        item.fox = child.fox
-                                        item.email = child.email
-                                    }
-                                    return child
-                                })
-                            }
-                            if (!item.man) {
-                                item.man = "--"
-                                item.phone = "--"
-                                item.fox = "--"
-                                item.email = "--"
-                            }
-                            return item
-                        })
-                        this.allData = tools.deepCopy(data)
+                        this.allData = tools.deepCopy(res.data.content.insurance)
                         this.tableData = this.pagination(this.page.currentPage, this.page.size, this.allData)
-                        this.page.total = data.length
+                        this.page.total = this.allData.length
                     } else {
                         this.$message.error("请求失败:" + res.data.resultMsg)
                     }

+ 6 - 26
src/components/dialogs/list/maintainerDialog.vue

@@ -26,10 +26,10 @@
               </template>
             </el-table-column>
             <el-table-column header-align='center' prop="website" label="网址"></el-table-column>
-            <el-table-column header-align='center' prop="man" label="联系人"></el-table-column>
-            <el-table-column header-align='center' prop="phone" label="联系电话"></el-table-column>
-            <el-table-column header-align='center' prop="faxes" label="传真"></el-table-column>
-            <el-table-column header-align='center' prop="email" label="电子邮件"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].name" label="联系人"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].phone" label="联系电话"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].fax" label="传真"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].email" label="电子邮件"></el-table-column>
           </el-table>
         </el-radio-group>
         <div class="right" style="background: #fff;">
@@ -113,29 +113,9 @@
                 }
                 getLib({"type": ["maintenance"]}).then(res => {
                     if (res.data.result == "success") {
-                        let data = res.data.content.maintenance.map(item => {
-                            if (item.contacts && item.contacts.length) {
-                                item.contacts.map(child => {
-                                    if (child.projectId == this.projectId) {
-                                        item.phone = child.phone
-                                        item.man = child.name
-                                        item.fox = child.fox
-                                        item.email = child.email
-                                    }
-                                    return child
-                                })
-                            }
-                            if (!item.man) {
-                                item.man = "--"
-                                item.phone = "--"
-                                item.fox = "--"
-                                item.email = "--"
-                            }
-                            return item
-                        })
-                        this.allData = tools.deepCopy(data)
+                        this.allData = tools.deepCopy(res.data.content.maintenance)
                         this.tableData = this.pagination(this.page.currentPage, this.page.size, this.allData)
-                        this.page.total = data.length
+                        this.page.total = this.allData.length
                     } else {
                         this.$message.error("请求失败:" + res.data.resultMsg)
                     }

+ 6 - 26
src/components/dialogs/list/supplierDialog.vue

@@ -26,10 +26,10 @@
               </template>
             </el-table-column>
             <el-table-column header-align='center' prop="website" label="网址"></el-table-column>
-            <el-table-column header-align='center' prop="man" label="联系人"></el-table-column>
-            <el-table-column header-align='center' prop="phone" label="联系电话"></el-table-column>
-            <el-table-column header-align='center' prop="faxes" label="传真"></el-table-column>
-            <el-table-column header-align='center' prop="email" label="电子邮件"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].name" label="联系人"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].phone" label="联系电话"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].fax" label="传真"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].email" label="电子邮件"></el-table-column>
           </el-table>
         </el-radio-group>
         <div class="right" style="background: #fff;">
@@ -113,29 +113,9 @@
                 }
                 getLib({"type": ["supplier"]}).then(res => {
                     if (res.data.result == "success") {
-                        let data = res.data.content.supplier.map(item => {
-                            if (item.contacts && item.contacts.length) {
-                                item.contacts.map(child => {
-                                    if (child.projectId == this.projectId) {
-                                        item.phone = child.phone
-                                        item.man = child.name
-                                        item.fox = child.fox
-                                        item.email = child.email
-                                    }
-                                    return child
-                                })
-                            }
-                            if (!item.man) {
-                                item.man = "--"
-                                item.phone = "--"
-                                item.fox = "--"
-                                item.email = "--"
-                            }
-                            return item
-                        })
-                        this.allData = tools.deepCopy(data)
+                        this.allData = tools.deepCopy(res.data.content.supplier)
                         this.tableData = this.pagination(this.page.currentPage, this.page.size, this.allData)
-                        this.page.total = data.length
+                        this.page.total = this.allData.length
                     } else {
                         this.$message.error("请求失败:" + res.data.resultMsg)
                     }

+ 251 - 239
src/components/dialogs/list/systemType.vue

@@ -2,271 +2,283 @@
     systemType 设备所属类型
 -->
 <template>
-  <el-dialog title="所属系统实例" :visible.sync="dialog.systemType" width="900px">
-    <div>
-      <div id="systemType">
-        <div class="title-search query-form" style="padding: 10px;margin-bottom: 10px;" v-if="type != 'read' ">
-          <el-row>
-            <el-col :span="10">
-              <span>系统所属建筑</span>
-              <el-select v-model="buildId" placeholder="请选择" @change="getTableData">
-                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
-                </el-option>
-              </el-select>
-            </el-col>
-            <el-col :span="14">
-              <el-input placeholder="输入名称或编码进行查询" v-model="search" size="small" style="width:300px; margin-right:10px"
-                        clearable></el-input>
-              <el-button size="small" @click="getTableData">查找</el-button>
-            </el-col>
-          </el-row>
+    <el-dialog title="所属系统实例" :visible.sync="dialog.systemType" width="900px">
+        <div>
+            <div id="systemType">
+                <div class="title-search query-form" style="padding: 10px; margin-bottom: 10px" v-if="type != 'read'">
+                    <el-row>
+                        <el-col :span="10">
+                            <span>系统所属建筑</span>
+                            <el-select v-model="buildId" placeholder="请选择" @change="getTableData">
+                                <el-option v-for="item in options" :key="item.id" :label="item.localName" :value="item.id"> </el-option>
+                            </el-select>
+                        </el-col>
+                        <el-col :span="14">
+                            <el-input
+                                placeholder="输入名称或编码进行查询"
+                                v-model="search"
+                                size="small"
+                                style="width: 300px; margin-right: 10px"
+                                clearable
+                            ></el-input>
+                            <el-button size="small" @click="getTableData">查找</el-button>
+                        </el-col>
+                    </el-row>
+                </div>
+                <el-table
+                    class="data-table"
+                    border
+                    row-key="id"
+                    :data="tableData"
+                    @selection-change="handleSelectionChange"
+                    style="width: 100%"
+                    ref="multipleTable"
+                >
+                    <el-table-column v-if="type != 'read'" type="selection" :reserve-selection="true" :disabled="true" width="55"></el-table-column>
+                    <el-table-column label="系统名称" header-align="center">
+                        <template slot-scope="scope">{{ scope.row.localName || scope.row.name }}</template>
+                    </el-table-column>
+                    <el-table-column label="本地编码" header-align="center">
+                        <template slot-scope="scope">{{ scope.row.localId || "--" }}</template>
+                    </el-table-column>
+                    <el-table-column label="系统类型" prop="categoryName" header-align="center"></el-table-column>
+                    <el-table-column label="详情" header-align="center" width="100" align="center">
+                        <template slot-scope="scope">
+                            <el-button @click="lookDeatils(scope.row)" type="text">详情</el-button>
+                        </template>
+                    </el-table-column>
+                </el-table>
+            </div>
         </div>
-        <el-table class='data-table' border :data="type == 'read'?linkSystemData:tableData"
-                  @selection-change="handleSelectionChange" style="width: 100%" ref="multipleTable">
-          <el-table-column v-if="type != 'read' " type="selection" :reserve-selection="true" :disabled="true"
-                           width="55"></el-table-column>
-          <el-table-column label="系统名称" header-align='center'>
-            <template slot-scope="scope">{{ scope.row.localName || scope.row.name }}</template>
-          </el-table-column>
-          <el-table-column label="本地编码" header-align='center'>
-            <template slot-scope="scope">{{ scope.row.localId || '--' }}</template>
-          </el-table-column>
-          <el-table-column label="专业" prop="MajorName" header-align='center'></el-table-column>
-          <el-table-column label="详情" header-align='center' width="100" align="center">
-            <template slot-scope="scope">
-              <el-button @click="lookDeatils(scope.row)" type="text">详情</el-button>
-            </template>
-          </el-table-column>
-        </el-table>
-      </div>
-    </div>
-    <span slot="footer" class="dialog-footer" v-if="type != 'read' ">
-      <el-button type="primary" @click="getChange">确 定</el-button>
-    </span>
-    <el-dialog title="系统详情" :visible.sync="iframeShow" v-if="iframeShow" width="500px" append-to-body>
-      <iframe id="google_ads_frame2" name="google_ads_frame2" frameborder="0" :src="iframeSrc" marginwidth="0"
-              marginheight="0" vspace="0" hspace="0"
-              style="width:100%;height:500px;" allowtransparency="true" scrolling="no" allowfullscreen="true"></iframe>
+        <span slot="footer" class="dialog-footer" v-if="type != 'read'">
+            <el-button type="primary" @click="getChange">确 定</el-button>
+        </span>
+        <el-dialog title="系统详情" :visible.sync="iframeShow" v-if="iframeShow" width="500px" append-to-body>
+            <iframe
+                id="google_ads_frame2"
+                name="google_ads_frame2"
+                frameborder="0"
+                :src="iframeSrc"
+                marginwidth="0"
+                marginheight="0"
+                vspace="0"
+                hspace="0"
+                style="width: 100%; height: 500px"
+                allowtransparency="true"
+                scrolling="no"
+                allowfullscreen="true"
+            ></iframe>
+        </el-dialog>
     </el-dialog>
-  </el-dialog>
 </template>
 <script>
 import myPagination from "@/components/ledger/lib/myPagination";
-import { queryLinkSys, getSpaceFloor, equipLinkSys } from "@/api/scan/request"
+import { querySysLinkBuild, buildingQuery, equipLinkSys } from "@/api/scan/request"
 import tools from "@/utils/scan/tools"
 import { mapGetters } from 'vuex'
 
 export default {
-  components: {
-    myPagination
-  },
-  props: {
-    dialog: {
-      type: Object,
-      default: function () {
+    components: {
+        myPagination
+    },
+    props: {
+        dialog: {
+            type: Object,
+            default: function () {
+                return {
+                    systemType: true
+                };
+            }
+        },
+        graphyId: {
+            type: String,
+            default: ""
+        },
+        device: {},
+        curDevice: {
+            default: ''
+        },//设备id
+        type: {
+            type: String,
+            default: "read"
+        },
+        list: {
+            type: [Array]
+        }
+    },
+    data() {
         return {
-          systemType: true
+            search: "", //搜索文案
+            tableData: [],
+            systemList: [],
+            linkSystemData: [],
+            multipleSelection: [],
+            iframeSrc: "",
+            iframeShow: false,
+            buildId: 'all', //查询条件
+            options: [], //系统所属建筑
         };
-      }
     },
-    graphyId: {
-      type: String,
-      default: ""
+    computed: {
+        ...mapGetters("layout", ["projectId", "secret", "userId"])
     },
-    device: {},
-    curDevice: {
-      default: ''
-    },//设备id
-    type: {
-      type: String,
-      default: "read"
+    mounted() {
     },
-    list: {
-      type: [Array]
-    }
-  },
-  data() {
-    return {
-      search: "", //搜索文案
-      tableData: [],
-      systemList: [],
-      linkSystemData: [],
-      multipleSelection: [],
-      iframeSrc: "",
-      iframeShow: false,
-      buildId: 'all', //查询条件
-      options: [], //系统所属建筑
-    };
-  },
-  computed: {
-    ...mapGetters("layout", ["projectId", "secret", "userId"])
-  },
-  mounted() {
-  },
-  methods: {
-    //获取查询条件-建筑
-    // getData() { // 物理世界 已无接口
-    //   let param = {
-    //     ProjId: this.projectId,
-    //     secret: this.secret,
-    //   }
-    //   getSpaceFloor(param).then(res => {
-    //     if (res.data.Result == 'success') {
-    //       let data = this.changeArr(res.data.Content)
-    //       data.unshift({
-    //         value: "all",
-    //         label: "全部"
-    //       }, {
-    //           value: "noKnow",
-    //           label: "未明确建筑的设备"
-    //         })
-    //       this.options = data
-    //     } else {
-    //       this.$message.error(res.data.ResultMsg)
-    //     }
-    //   }).catch(err => {
-    //     this.$message.error(err)
-    //   })
-    // },
-    //将数组转换成optiosn格式
-    changeArr(arr) {
-      return arr.map(item => {
-        if (item.floors && item.floors.length && this.type == "yes") {
-          return {
-            value: item.id,
-            label: item.infos.BuildLocalName,
-            children: item.floors.map(i => {
-              return {
-                value: i.id,
-                label: i.infos.FloorLocalName,
-                FloorSequenceID: i.infos.FloorSequenceID
-              }
+    methods: {
+        //获取查询条件-建筑
+        getData() {
+            let param = {
+                orders: "localName asc",
+                pageNumber: 1,
+                pageSize: 1000
+            }
+            buildingQuery(param, res => {
+                if (res.result == 'success') {
+                    let data = res.content;
+                    data.unshift({
+                        id: "all",
+                        localName: "全部"
+                    }, {
+                        id: "noKnow",
+                        localName: "未明确建筑的系统"
+                    })
+                    this.options = data
+                } else {
+                    this.$message.error(res.message)
+                }
+            })
+        },
+        handleSelectionChange(val) {
+            this.multipleSelection = val;
+        },
+        //设置默认
+        toggleSelection(rows) {
+            if (this.$refs.multipleTable) {
+                this.$refs.multipleTable.clearSelection();
+            }
+            if (rows.length && this.list.length) {
+                rows.map(row => {
+                    this.list.map(t => {
+                        if (row.id == t.id) {
+                            this.$refs.multipleTable.toggleRowSelection(row)
+                        }
+                    })
+                })
+            }
+        },
+        //确认
+        getChange() {
+            this.createRelatSys()
+            this.$emit("change", this.multipleSelection)
+            this.dialog.systemType = false
+            this.multipleSelection = []
+        },
+        //点击详情
+        lookDeatils(infos) {
+            this.$message("开发中...")
+        },
+        //根据设备类型-查询系统关联专业
+        getTableData() {
+            let param = {
+                data: {
+                    filters: `classCode="${this.device.deviceId.substring(0, 4)}"`,
+                    pageNumber: 1,
+                    pageSize: 1000
+                }
+            }
+            //建筑id
+            if (this.buildId === "noKnow") {
+                param.buildingId = 1;
+            } else if (this.buildId && this.buildId != "all") {
+                param.buildingId = this.buildId;
+            }
+            //输入的查询条件
+            if (this.search) {
+                param.data.filters += `;localName contain "${this.search}" or localId contain "${this.search}"`
+            }
+            querySysLinkBuild(param, res => {
+                this.tableData = res.content
+                this.toggleSelection(res.content)
+            })
+        },
+        getSystemTableData() {
+            const sysIdList = this.linkSystemData.map(sys => {
+                return sys.id
             })
-          }
-        } else {
-          return {
-            value: item.id,
-            label: item.infos.BuildLocalName,
-            children: null,
-            isChilren: 1,
-          }
+            if (sysIdList.length) {
+                let param = {
+                    data: {
+                        filters: `id in ${JSON.stringify(sysIdList)}`,
+                        pageNumber: 1,
+                        pageSize: 1000
+                    }
+                }
+                querySysLinkBuild(param, res => {
+                    this.tableData = res.content
+                })
+            } else {
+                this.tableData = [];
+            }
+        },
+        //获取关联的系统
+        getLinkSystemData() {
+            this.linkSystemData = this.list ? JSON.parse(JSON.stringify(this.list)) : []
+            if (this.type == 'read') {
+                this.getSystemTableData();
+            }
+        },
+        //添加设备关联系统关系
+        createRelatSys() {
+            if (this.curDevice) {//有即为编辑
+                let param = {
+                    equipId: this.curDevice,
+                    sysIdList: []
+                }
+                this.multipleSelection.map(t => {
+                    param.sysIdList.push(t.id)
+                })
+                equipLinkSys(param, res => {
+                    this.multipleSelection = []
+                })
+            }
         }
-      })
     },
-    handleSelectionChange(val) {
-      this.multipleSelection = val;
-    },
-    //设置默认
-    toggleSelection(rows) {
-      this.$refs.multipleTable.clearSelection();
-      if (rows.length && this.list.length) {
-        rows.map(row => {
-          this.list.map(t => {
-            if (row.SysID == t.SysID) {
-              this.$refs.multipleTable.toggleRowSelection(row)
+    watch: {
+        dialog: {
+            deep: true,
+            handler() {
+                if (this.dialog.systemType) {
+                    this.getData()
+                    this.tableData = [];
+                    if (this.type == 'read') {
+                        this.getLinkSystemData()
+                    } else {
+                        this.getLinkSystemData()
+                        this.getTableData()
+                    }
+                }
             }
-          })
-        })
-      }
-    },
-    //确认
-    getChange() {
-      this.createRelatSys()
-      this.$emit("change", this.multipleSelection)
-      this.dialog.systemType = false
-      this.multipleSelection = []
-    },
-    //点击详情
-    lookDeatils(infos) {
-      this.$message("开发中...")
-      // this.iframeSrc =
-      //   process.env.BASE_URL +
-      //   ":8889/#/details?perjectId=" +
-      //   this.projectId +
-      //   "&secret=" +
-      //   this.secret +
-      //   "&FmId=" +
-      //   infos.id +
-      //   "&type=1&code=" +
-      //   infos.category.substring(2, 4);
-      // this.iframeShow = true;
-    },
-    //根据设备类型-查询系统关联专业
-    getTableData() {
-      let param = {
-        filters: `classCode="${this.device.deviceId.substring(0, 2)}"`,
-        pageNumber: 1,
-        pageSize: 1000
-      }
-      //建筑id
-      if (this.buildId == "noKnow") {
-        param.filters += `;buildingId isNull`
-      } else if (this.buildId && this.buildId != "all") {
-        param.filters += `;buildingId='${this.buildId}'`
-      }
-      //输入的查询条件
-      if (this.search) {
-        param.filters += `;localName contain "${this.search}" or localId contain "${this.search}"`
-      }
-      queryLinkSys(param, res => {
-        this.tableData = res.content
-        this.toggleSelection(res.content)
-      })
-    },
-    //获取关联的系统
-    getLinkSystemData() {
-      this.linkSystemData = this.list ? JSON.parse(JSON.stringify(this.list)) : []
-    },
-    //添加设备关联系统关系
-    createRelatSys() {
-      if (this.curDevice) {//有即为编辑
-        let param = {
-          EquipID: this.curDevice,
-          SysIdList: []
-        }
-        this.multipleSelection.map(t => {
-          param.SysIdList.push(t.SysID)
-        })
-        equipLinkSys(param, res => {
-          this.multipleSelection = []
-        })
-      }
-    }
-  },
-  watch: {
-    dialog: {
-      deep: true,
-      handler() {
-        if (this.dialog.systemType) {
-          // this.getData()
-          if (this.type == 'read') {
-            this.getLinkSystemData()
-          } else {
-            this.getTableData()
-          }
+        },
+        projectId() {
+            this.buildId = 'all';
+            this.options = [];
+            this.getData()
         }
-      }
-    },
-    projectId() {
-      this.buildId = 'all';
-      this.options = [];
-      // this.getData()
     }
-  }
 };
 </script>
 
 <style lang="less">
 #systemType {
-  height: 455px;
-  overflow-y: auto;
+    height: 455px;
+    overflow-y: auto;
 
-  .el-table thead {
-    tr {
-      th {
-        background-color: #f5f7fa;
-      }
+    .el-table thead {
+        tr {
+            th {
+                background-color: #f5f7fa;
+            }
+        }
     }
-  }
 }
 </style>

+ 0 - 872
src/components/ledger/addDialog/dialogAssets.vue

@@ -1,872 +0,0 @@
-<!--
-    上传文件的弹窗
--->
-
-<template>
-  <div v-if="dialog.addDevice">
-    <router-view></router-view>
-    <router-link to="/system/list/addsystem"></router-link>
-    <el-dialog
-      :title="title"
-      :center="isCenter"
-      :visible.sync="dialog.addDevice"
-      :width="width"
-      :fullscreen="isFull"
-    >
-      <div id="addDevice">
-        <div v-show="!isCenter">
-          <my-cascader ref="cascader" @change="changeCader"></my-cascader>
-        </div>
-        <div v-if="isCenter">
-          <div>
-            <div class="hanson-bar">
-              <span>当前选择的设备族:{{deviceType.facility}}</span>
-              <div style="float:right;overflow:hidden;">
-                <span>增加</span>
-                <el-input v-model="addNum" style="width:50px;" placeholder="增加个数" size="small"></el-input>
-                <span>个{{deviceType.facility}}</span>
-                <el-button size="small" @click="addMain">增加</el-button>
-              </div>
-              <div
-                style="width:200px;color:gray;float:right;font-size:10px;"
-              >是否隐藏自动填充信息点:
-                <el-tooltip :content="'' + (isWatch ? '隐藏' : '不隐藏')" placement="top">
-                  <el-switch
-                    @change="changeWatch"
-                    v-model="isWatch"
-                    active-color="#13ce66"
-                    inactive-color="gray"
-                  ></el-switch>
-                </el-tooltip>
-              </div>
-            </div>
-            <div v-show="main && main.length" id="myHandson" ref="myHandson"></div>
-          </div>
-        </div>
-      </div>
-      <div v-show="!isCenter" slot="footer" class="dialog-footer">
-        <!-- <el-button>取 消</el-button> -->
-        <el-button type="primary" @click="step(1)">下 一 步</el-button>
-      </div>
-      <span v-show="isCenter" slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="createAssets">创建资产</el-button>
-      </span>
-    </el-dialog>
-    <qrcode :dialog="myDialog" :addBody="true" ref="qrcode"></qrcode>
-    <firm
-      :mess="{deviceId : deviceType.code}"
-      ref="firm"
-      @changeFirm="firmChange"
-      :dialog="myDialog"
-    ></firm>
-    <supply-dialog @change="supplyChange" :id="id" ref="supply" :dialog="myDialog"></supply-dialog>
-    <supplier-dialog ref="supplier" @changeSupplier="supplierChange" :dialog="myDialog"></supplier-dialog>
-    <guarantee-dialog ref="guarantee" :id="id" @change="guaranteeChange" :dialog="myDialog"></guarantee-dialog>
-    <upload-files-dialog
-      ref="upload"
-      @changeFile="fileChange"
-      :keysArr="filesArr"
-      :dialog="myDialog"
-    ></upload-files-dialog>
-    <upload-img-dialog @changeFile="imgChange" :keysArr="imgsArr" :dialog="myDialog"></upload-img-dialog>
-    <maintainer-dialog @changeMaintainer="changeMaintainer" ref="maintainer" :dialog="myDialog"></maintainer-dialog>
-    <insurer-dialog @changeInsurer="changeInsurer" ref="insurer" :dialog="myDialog"></insurer-dialog>
-    <pic-dialog :dialog="myDialog" :keysArr="picsArr" @change="changePics"></pic-dialog>
-  </div>
-</template>
-<script>
-import myCascader from "@/components/ledger/lib/assets";
-import hansonTable from "@/components/ledger/lib/addDevice";
-import tools from "@/utils/scan/tools";
-
-import qrcode from "@/components/business_space/lib/qrcode";
-import firm from "@/components/business_space/dialogs/list/firm";
-import supplyDialog from "@/components/business_space/dialogs/list/supplyDialog";
-import supplierDialog from "@/components/business_space/dialogs/list/supplierDialog";
-import maintainerDialog from "@/components/business_space/dialogs/list/maintainerDialog";
-import insurerDialog from "@/components/business_space/dialogs/list/insurerDialog";
-import guaranteeDialog from "@/components/business_space/dialogs/list/guaranteeDialog";
-import uploadFilesDialog from "@/components/business_space/dialogs/list/filesDialog";
-import uploadImgDialog from "@/components/business_space/dialogs/list/uploadImgDialog";
-import picDialog from "@/components/business_space/dialogs/list/picDialog"
-
-
-import Handsontable from "handsontable-pro"
-    import 'handsontable-pro/dist/handsontable.full.css'
-    import zhCN from 'handsontable-pro/languages/zh-CN';
-//下拉插件
-// import "@/assets/js/chosen.jquery.min";
-// import "@/assets/js/handsontable-chosen-editor";
-
-import text from "@/utils/handsontable/mainText"
-
-import showTools from "@/utils/handsontable/notShow"
-import {mapGetters, mapActions} from "vuex";
-import uuid from "@/utils/scan/uuid";
-import { getTableHeader, createProperty, getSpaceFloor, createAssetsList } from "@/api/scan/request";
-let table = function (num) {
-  let main = []
-  for (let i = 0; i < num; i++) {
-    main.push({})
-  }
-  return main
-}
-export default {
-  components: {
-    myCascader,
-    hansonTable,
-    qrcode, //二维码页面
-    firm, //
-    supplyDialog,
-    supplierDialog,
-    guaranteeDialog,
-    uploadFilesDialog,
-    maintainerDialog,
-    insurerDialog,
-    uploadImgDialog,
-    picDialog
-  },
-  props: {
-    dialog: {
-      type: Object,
-      default: function () {
-        return {
-          addDevice: false
-        };
-      }
-    },
-    assetType: {
-      type: Array,
-      default: function () {
-        return []
-      }
-    }
-  },
-  computed: {
-        ...mapGetters("layout", [
-            "projectId",
-            "secret",
-            "userId"
-        ])
-    },
-  data() {
-    return {
-      width: "30%",
-      isFull: false,//dialog是否为全屏
-      title: "确定新增资产的类型",
-      isCenter: false,
-      deviceType: {},
-      main: table(1),
-      mess: {},
-      headers: null,
-      page: {
-        size: 50,
-        sizes: [10, 30, 50, 100, 150, 200],
-        total: 400,
-        currentPage: 1
-      },
-      id: 0,
-      myDialog: {
-        qrcode: false, //二维码弹窗
-        firm: false, //厂商弹窗
-        supply: false, //选择供应合同
-        supplier: false, //供应商选择
-        guarantee: false, //选择保单
-        maintainer: false, //选择维修商
-        insurer: false, //选择保险公司
-        uploadFiles: false,//上传文件
-        uploadImgs: false,//上传单个图片
-        pic: false, //多个图片
-      },
-      addNum: 1,//增加个数
-      row: null,//被修改的row
-      filesArr: [],//保存临时的文件key
-      messKey: null,
-      imgsArr: [],//临时保存的图片key数组
-      picsArr: [],//临时设备图片keys数组
-      param: {
-        ProjId: '',
-        secret: ''
-      },
-      floorData: [],
-      isWatch: true,
-      ajaxResult: true
-    };
-  },
-  created() {
-    this.param.ProjId = this.projectId
-    this.param.secret = this.secret
-    // this.getFloorData()
-  },
-  mounted() { },
-  methods: {
-    //设置默认选中数据
-    setValue() {
-      this.$nextTick(_ => {
-        this.$refs.cascader.setValue(this.assetType)
-      })
-    },
-    //获取楼层数据
-    // getFloorData() { // 物理世界 已无接口
-    //   getSpaceFloor(this.param).then(res => {
-    //     if (res.data.Result == 'success') {
-    //       let data = this.changeArr(res.data.Content), floorData = []
-    //       data.map(item => {
-    //         if (!!item.children) {
-    //           item.children.unshift({
-    //             value: '',
-    //             label: "未明确楼层的设备"
-    //           })
-    //         }
-    //         return item
-    //       })
-    //       data.map(item => {
-    //         if (!!item.children && item.children.length) {
-    //           item.children.map(child => {
-    //             floorData.push({
-    //               Code: item.value + "-" + child.value,
-    //               Name: item.label + "-" + child.label
-    //             })
-    //           })
-    //         }
-    //       })
-    //       this.floorData = floorData
-    //       //   this.options = data
-    //     } else {
-    //       this.$message.error(res.data.ResultMsg)
-    //     }
-    //   }).catch(() => {
-    //     this.$message.error("请求出错")
-    //   })
-    // },
-    //将数组转换成optiosn格式
-    changeArr(arr) {
-      return arr.map(item => {
-        if (item.floors && item.floors.length) {
-          return {
-            value: item.id,
-            label: item.infos.BuildLocalName,
-            children: item.floors.map(i => {
-              return {
-                value: i.id,
-                label: i.infos.FloorLocalName || "未知",
-              }
-            })
-          }
-        } else {
-          return {
-            value: item.id,
-            label: item.infos.BuildLocalName,
-            children: null,
-            isChilren: 1,
-          }
-        }
-      })
-    },
-
-    //增加个数
-    addMain() {
-      for (let i = 0; i < this.addNum; i++) {
-        this.main.push({})
-      }
-      if (!!this.hot) {
-        this.hot.destroy()
-      }
-      this.initHot()
-    },
-
-    //下一步
-    step(val) {
-      if (!!val) {
-        this.isFull = true
-        this.isCenter = true
-        this.title = "添加资产"
-        this.getData()
-      } else {
-        this.isFull = false
-        this.isCenter = false
-      }
-    },
-    //修改设备类型
-    changeCader(val) {
-      this.deviceType = val
-    },
-    //获取header的mess
-    getHeader(mess) {
-      this.mess = mess;
-    },
-
-    //获取主体内容
-    getMain(floorMess) {
-    },
-
-    //获取表头
-    getData() {
-      this.main = table(1)
-      getTableHeader({
-        code: this.deviceType.code,
-        ProjId: this.projectId
-      }).then(res => {
-        this.headers = res.data.Content;
-        if (!!this.hot) {
-          this.hot.destroy();
-          this.hot = null;
-        }
-        let data = tools.getItem(this.deviceType.code)
-        if (!!data) {
-          this.main = data
-        }
-        this.initHot();
-      });
-    },
-
-    changeWatch() {
-      this.getData()
-    },
-
-    //撤回
-    undo() {
-      this.hot.undo();
-    },
-
-    //刷新
-    reset() {
-      this.getData();
-    },
-
-    //添加设备
-    addDevice() {
-    },
-
-    //创建资产
-    createAssets() {
-      let data = []
-      let copyData = tools.copyArr(this.main)
-      let falg = false
-      copyData.map(item => {
-        if (!!item.infos) {
-          if (item.infos.EquipLocalName) {
-            item.family = this.deviceType.code
-            data.push(item)
-          } else {
-            falg = true
-          }
-        }
-      })
-      if (falg) {
-        this.$message.error("存在资产的本地名称为空,请检查")
-        return
-      }
-      let params = []
-      data.map(item => {
-        if (!!item.infos) {
-          let one = {}
-          if (!!item.flowBuild) {
-            one.BuildId = item.flowBuild.split("-")[0]
-            one.FloorId = item.flowBuild.split("-")[1] || null
-          }
-          one.Family = this.deviceType.code
-          one.FamilyName = this.deviceType.facility
-          one.Infos = item.infos
-          one.FmId = "Pe" + uuid(32, 16)
-          one.ProjId = this.projectId
-          one.FmName = item.infos.EquipLocalName || ""
-          one.X = 0
-          one.Y = 0
-          params.push(one)
-        }
-      })
-      params.map(item => {
-        for (let k in item.Infos) {
-          if (item.Infos[k] == "") {
-            item.Infos[k] = null
-          }
-        }
-      })
-      if (params.length) {
-        this.createJson(params)
-      } else {
-        this.$message.error("信息点不能为空")
-      }
-    },
-
-    //新建资产请求
-    async createJson(data) {
-      data.map(item => {
-        if (!!item.Infos.dpSupplierId) {
-          item.Infos.dpSupplierId = item.Infos.dpSupplierId.split("-")[0]
-        }
-        if (!!item.Infos.dpManufacturerId) {
-          item.Infos.dpManufacturerId = item.Infos.dpManufacturerId.split("-")[0]
-        }
-        if (!!item.Infos.dpInsurerId) {
-          item.Infos.dpInsurerId = item.Infos.dpInsurerId.split("-")[0]
-        }
-        if (!!item.Infos.dpMaintainerId) {
-          item.Infos.dpMaintainerId = item.Infos.dpMaintainerId.split("-")[0]
-        }
-        if (!!item.Infos.dpSpecificationId) {
-          item.Infos.dpSpecificationId = item.Infos.dpSpecificationId.split("-")[0]
-        }
-        for (let k in item.Infos) {
-          if (item.Infos[k] == "") {
-            item.Infos[k] = null
-          }
-        }
-        return item
-      })
-      this.ajaxResult = true
-      let param = {
-        FmList: data,
-        ProjId: this.projectId,
-        UserId: this.userId
-      }
-      await this.createAssetId(param)
-    },
-
-    async createAssetId(param) {
-      await createAssetsList(param, res => {
-        console.log(res)
-        if (res.Result != "success") {
-          this.$message.error("请求错误")
-        } else {
-          tools.removeItem(this.deviceType.code)
-          this.$emit("close", this.deviceType)
-          this.dialog.addDevice = false
-        }
-      })
-    },
-
-    /**
-     * 表头文案处理函数
-     * @param list header数组数据
-     *
-     * @return 处理好的文案
-     */
-    delHeader(list) {
-      let arr = tools.copyArr(list)
-      // 如果不是只读状态,添加四大厂商选择
-      arr = showTools.arrToArr(arr)
-      let readArr = ["A1", "A2", "B1", "C5", "D1", "D2", "X", "L", "L1", "L2", "F1", "F2", "M"]
-      readArr.push("Own")
-      let data = showTools.changeHeader(arr, readArr, false, this.isWatch, false, true)
-      data.unshift("所属建筑楼层");
-      console.log(data, "data")
-      return data;
-    },
-
-    /**
-     * 表头数据处理函数
-     * @param list header数组数据
-     *
-     * @return 处理好的数据格式
-     */
-    getType(list) {
-      let arr = tools.copyArr(list)
-      // 如果不是只读状态,添加四大厂商选择
-      if (!this.onlyRead) {
-        arr = showTools.arrToArr(arr)
-      }
-      let data = showTools.showTypes(arr, false, this.isWatch, false, true)
-      data.unshift(
-        {
-          data: "flowBuild",
-          renderer: tools.customDropdownRenderer,
-          editor: "chosen",
-          chosenOptions: {
-            // multiple: true,//多选
-            data: this.floorData
-          }
-        }
-      );
-      console.log("type", data)
-      return data;
-    },
-
-
-    //初始化插件
-    initHot() {
-      var container = document.getElementById("myHandson");
-      let winHeight = document.documentElement.clientHeight;
-      this.hot = new Handsontable(container, {
-        data: this.main,
-        colHeaders: this.delHeader(this.headers), //表头文案
-        columns: this.getType(this.headers), //数据显示格式
-        filters: true,
-        rowHeaders: true,
-        height: winHeight - 100 - 50 - 60,
-        columnSorting: true, //添加排序
-        sortIndicator: true, //添加排序
-        renderAllRows: true,
-        autoColumnSize: true,
-        language: "zh-CN",
-        maxRows: this.main.length,
-        manualColumnResize: true,
-        manualColumnMove: true,
-        dropdownMenu: [
-          "filter_by_condition",
-          "filter_by_value",
-          "filter_action_bar"
-        ],
-        contextMenu: this.onlyRead ? false :{
-          items: {
-            remove_row: {
-              name: "删除该资产"
-            }
-          }
-        },
-        afterChange: this.tdChange, //修改后
-        afterFilter: this.trimmedRows, //排序前
-        afterRemoveRow: this.romoveFm, //右键删除
-        afterOnCellMouseDown: this.eventClick //鼠标点击
-      });
-      let pro = document.getElementById("hot-display-license-info");
-      if (!!pro) {
-        pro.parentNode.removeChild(pro);
-      }
-      this.isLoading = false;
-    },
-
-    tdChange() {
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //表格中的点击
-    eventClick(el, rowArr) {
-      //点击的是表头
-      if (rowArr.row < 0) {
-        return;
-      }
-      let filter = this.filtersArr;
-      //被筛选过后的数组
-      let trimmedArr = this.trimmedRows();
-      //是否启用了排序
-      let isSort = this.hot.getPlugin("columnSorting").isSorted();
-      if (trimmedArr.length && isSort) {
-        let sortArr = this.myHotArr.getPlugin("columnSorting").rowsMapper
-          .__arrayMap;
-        let infos = this.main[trimmedArr[sortArr[rowArr.row]]];
-        this.getInfors(infos, sortArr[rowArr.row]);
-      } else if (isSort) {
-        //排序后的数组
-        let sortArr = this.hot.getPlugin("columnSorting").rowsMapper.__arrayMap;
-        let infos = this.main[sortArr[rowArr.row]];
-        this.getInfors(infos, sortArr[rowArr.row]);
-      } else if (trimmedArr.length) {
-        let infos = this.main[trimmedArr[rowArr.row]];
-        this.getInfors(infos, trimmedArr[rowArr.row]);
-      } else {
-        let infos = this.main[rowArr.row];
-        this.getInfors(infos, rowArr);
-      }
-    },
-
-    getInfors(infos, row) {
-      //其他的开始判断
-      let val = this.hot.colToProp(row.col);
-      if (val == "infos.EquipQRCode") {
-        this.myDialog.qrcode = true;
-        this.$refs.qrcode.getCanvas(1111);
-      }
-
-      if (val == "linkSystem") {
-        this.systemList = this.main[row.row].linkSystem || []
-        this.dialog.systemType = true
-      }
-
-      if (val == "infos.dpManufacturerId") {
-        this.myDialog.firm = true;
-      }
-
-      if (val == "infos.SupplierContractID") {
-        let falg = null
-        if (!!this.main[row.row].infos) {
-          if (!!this.main[row.row].infos) {
-            falg = this.main[row.row].infos.dpSupplierId.split("-")[0]
-          }
-        }
-        if (!!falg) {
-          this.id = falg
-          this.myDialog.supply = true;
-        } else {
-          this.$message("请先选择供应商")
-        }
-      }
-
-      if (val == "infos.InsuranceNum") {
-        //选择保单
-        let falg = null
-        if (!!this.main[row.row].infos) {
-          if (!!this.main[row.row].infos) {
-            falg = this.main[row.row].infos.dpInsurerId.split("-")[0]
-          }
-        }
-        if (!!falg) {
-          this.id = falg
-          this.myDialog.guarantee = true;
-        } else {
-          this.$message("请先选择保险商")
-        }
-      }
-
-      if (val == "infos.InsuranceFile" || val == "infos.Archive") {
-        this.filesArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? [this.main[row.row].infos[val.split(".")[1]]] : []) : []
-        this.myDialog.uploadFiles = true
-      }
-
-      if (
-        val == "infos.InstallPic" ||
-        val == "infos.InstallDrawing" ||
-        val == "infos.Nameplate" ||
-        val == "infos.Drawing"
-      ) {
-        if (val == "infos.Nameplate") {
-          this.imgsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? [this.main[row.row].infos[val.split(".")[1]].key] : []) : []
-        } else {
-          this.imgsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? [this.main[row.row].infos[val.split(".")[1]]] : []) : []
-        }
-        console.log(this.imgsArr,'this.imgsArr')
-        this.myDialog.uploadImgs = true
-      }
-
-      if (val == "infos.Pic") {
-        this.picsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? this.main[row.row].infos[val.split(".")[1]] : []) : []
-        this.myDialog.pic = true
-      }
-
-      if (
-        val == "infos.Supplier"
-      ) {
-        this.myDialog.supplier = true;
-      }
-
-      if (
-        val == "infos.dpSupplierId"
-      ) {
-        this.myDialog.supplier = true;
-      }
-
-      if (val == "infos.dpMaintainerId"
-      ) {
-        this.myDialog.maintainer = true;
-      }
-
-      if (
-        val == "infos.dpInsurerId"
-      ) {
-        this.myDialog.insurer = true;
-      }
-
-      if (val == "infos.maintainer") {
-        this.myDialog.maintainer = true;
-      }
-
-      if (
-        val == "infos.Insurer" ||
-        val == "infos.InsurerContactor") {
-        this.myDialog.insurer = true;
-      }
-      this.row = row.row
-      this.messKey = val
-      console.log(val, row);
-    },
-
-    //获取被筛选掉的行号
-    trimmedRows() {
-      // var plugin = hot.getPlugin('trimRows').trimmedRows;//获取被筛选掉的行号
-      var plugin = this.hot.getPlugin("trimRows").trimmedRows;
-      let dataLength = this.main.length;
-      let dataArr = new Array();
-      for (let i = 0; i < dataLength; i++) {
-        dataArr.push(i);
-      }
-      if (plugin.length <= 0) {
-        dataArr = undefined;
-      } else {
-        dataArr = this.array_diff(dataArr, plugin);
-      }
-      return dataArr || [];
-      // var DataArray = new Array();
-
-      // for (var i = 0; i < plugin.length; i++) {
-      //     // 通过行号获取数据
-      //     DataArray.push(this.hot.getSourceDataAtRow(plugin[i]));
-      // }
-    },
-
-    //判断是否为空行
-    isEmptyRow(instance, row) {
-      var rowData = instance.countRows();
-      for (var i = 0, ilen = rowData.length; i < ilen; i++) {
-        if (rowData[i] !== null) {
-          return false;
-        }
-      }
-      return true;
-    },
-
-    //选择型号修改
-    firmChange(data) {
-      for (let key in data) {
-        // this.utilToKey(key, "brand", data, "Brand")
-        // this.utilToKey(key, "name", data, "Specification")
-        // this.utilToKey(key, "venderName", data, "manufacturer")
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name + "/" + data.brand
-          this.utilToKey(key, "venderId", data, "dpManufacturerId")
-        }
-        this.utilToKey(key, "specificationId", data, "dpSpecificationId")
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //如果选择供应商之后
-    supplierChange(data) {
-      for (let key in data) {
-        // this.utilToKey(key, "name", data, "Supplier")
-        // this.utilToKey(key, "email", data, "SupplierEmail")
-        // this.utilToKey(key, "website", data, "SupplierWeb")
-        // this.utilToKey(key, "phone", data, "SupplierPhone")
-        // this.utilToKey(key, "fox", data, "SupplierFax")
-        // this.utilToKey(key, "man", data, "SupplierContactor")
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name
-          console.log(data)
-          this.utilToKey(key, "venderId", data, "dpSupplierId")
-        }
-        // this.utilToKey(key, "specificationId", data, "dpSpecificationId")
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //供应商合同
-    supplyChange(data) {
-      let changeData = { id: data }
-      this.utilToKey("id", "id", changeData, "SupplierContractID")
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //保险合同
-    guaranteeChange(data) {
-      for (let key in data) {
-        this.utilToKey(key, "insuranceNo", data, "InsuranceNum")
-        if (key == "contractFile") {
-          if (!!data[key]) {
-            data[key] = [data[key]]
-          }
-        }
-        this.utilToKey(key, "contractFile", data, "InsuranceFile")
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //保险商变更
-    changeInsurer(data) {
-      for (let key in data) {
-        // this.utilToKey(key, "name", data, "Insurer")
-        // this.utilToKey(key, "email", data, "InsurerEmail")
-        // this.utilToKey(key, "website", data, "InsurerWeb")
-        // this.utilToKey(key, "phone", data, "InsurerFax")
-        // this.utilToKey(key, "man", data, "InsurerContactor")
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name
-          this.utilToKey(key, "venderId", data, "dpInsurerId")
-        }
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //维修商变更
-    changeMaintainer(data) {
-      for (let key in data) {
-        // this.utilToKey(key, "name", data, "maintainer")
-        // this.utilToKey(key, "email", data, "MaintainerEmail")
-        // this.utilToKey(key, "website", data, "MaintainerWeb")
-        // this.utilToKey(key, "phone", data, "MaintainerPhone")
-        // this.utilToKey(key, "fox", data, "MaintainerFax")
-        // this.utilToKey(key, "man", data, "MaintainerContactor")
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name
-          this.utilToKey(key, "venderId", data, "dpMaintainerId")
-        }
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    utilToKey(key, name, data, messName) {
-      if (key == name) {
-        this.setDataToMain(data[key], messName, this.row)
-      }
-    },
-
-    //上传文件弹窗触发事件
-    fileChange(keys) {
-      this.setDataToMain(keys[0], this.messKey.split(".")[1], this.row)
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //上传图片弹窗触发事件
-    imgChange(keys) {
-    console.log(keys,'keys')
-      this.setDataToMain(keys[0], this.messKey.split(".")[1], this.row)
-      tools.setItem(this.deviceType.code, this.main)
-      console.log(this.main,'this.main')
-    },
-
-    //设备图片弹窗改变事件
-    changePics(keys) {
-      this.setDataToMain(keys, this.messKey.split(".")[1], this.row)
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //判断是否有值,有值赋值
-    // setDataToMain(data, key, row) {
-    //     console.log(data, key, row)
-    //   if (!!data && data != '--') {
-    //       console.log("data存在")
-    //     if (!!this.main[row].infos) {
-    //       //铭牌照片特殊处理
-    //       console.log("处理保存",key)
-    //       this.main[row][key[0]][key[1]] = data
-    //       console.log(this.main)
-    //     } else {
-    //         console.log("存储已保存")
-    //       this.main[row][key[0]] = {}
-    //       this.main[row][key[0]][key[1]] = data
-    //     }
-    //   } else {
-    //     this.main[row].infos[key] = ''
-    //   }
-    // },
-    //判断是否有值,有值赋值
-    setDataToMain(data, key, row) {
-      if (!!data && data != '--') {
-        if (!!this.main[row].infos) {
-          //铭牌照片特殊处理
-          this.main[row].infos[key] = data
-        } else {
-          this.main[row].infos = {}
-          this.main[row].infos[key] = data
-        }
-      } else {
-        this.main[row].infos[key] = ''
-      }
-    }
-  },
-  watch: {
-    dialog: {
-      deep: true,
-      handler: function () {
-        if (this.dialog.addDevice) {
-          this.setValue()
-        }
-      }
-    }
-  }
-};
-</script>
-<style lang="less" scoped>
-#addDevice {
-  overflow: hidden;
-}
-</style>

+ 20 - 20
src/components/ledger/cenote/dialog/addSpaceDialog.vue

@@ -21,18 +21,18 @@
         <el-table-column type="selection" width="55"></el-table-column>
         <el-table-column :label="`${inSpaceType}本地名称`" show-overflow-tooltip min-width="100">
           <template slot-scope="scope">
-            {{scope.row.RoomLocalName||scope.row.RoomName||''}}
+            {{scope.row.localName||scope.row.name||''}}
           </template>
         </el-table-column>
         <el-table-column prop="localId" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
         <el-table-column prop :label="`所属建筑楼层`" show-overflow-tooltip min-width="100">
           <template slot-scope="scope">
-            {{ scope.row.BuildingId && floorType[scope.row.BuildingId]? ((floorType[scope.row.BuildingId] || '') + (scope.row.FloorId && floorType[scope.row.FloorId] ? (' - ' + floorType[scope.row.FloorId] || '') : '')) : ''}}
+            {{ scope.row.buildingId && floorType[scope.row.buildingId]? ((floorType[scope.row.buildingId] || '') + (scope.row.floorId && floorType[scope.row.floorId] ? (' - ' + floorType[scope.row.floorId] || '') : '')) : ''}}
           </template>
         </el-table-column>
-        <el-table-column prop="ObjectType" :label="`空间类型`" show-overflow-tooltip min-width="100">
+        <el-table-column prop="classCode" :label="`空间类型`" show-overflow-tooltip min-width="100">
           <template slot-scope="scope">
-            {{spaceType[scope.row.ObjectType] || ''}}
+            {{spaceType[scope.row.classCode] || ''}}
           </template>
         </el-table-column>
         <el-table-column prop="action" label="操作" min-width="100">
@@ -77,7 +77,7 @@ export default {
   },
   data() {
     return {
-      title: "添加系统所在业务空间",
+      title: "添加竖井所在业务空间",
       keycode: "", //输入查询条件
       inSpaceType: "业务空间",
       Buildfloor: ["all"], // 选中的建筑楼层
@@ -125,32 +125,32 @@ export default {
     getTableData() {
       let params = {
         data: {
-          Filters: "not RoomID isNull",
-          Orders: "localName desc",
-          PageNumber: this.page.pageNumber,
-          PageSize: this.page.pageSize
+          filters: "not id isNull",
+          orders: "localName desc",
+          pageNumber: this.page.pageNumber,
+          pageSize: this.page.pageSize
         },
         ShaftId: this.$route.query.ShaftId
       };
       if (this.Buildfloor[0] == "noKnow") {
-        params.data.Filters += `;buildingId isNull`;
+        params.data.filters += `;buildingId isNull`;
       } else if (this.Buildfloor[0] && this.Buildfloor[0] != "all") {
-        params.data.Filters += `;buildingId='${this.Buildfloor[0]}'`;
+        params.data.filters += `;buildingId='${this.Buildfloor[0]}'`;
       }
       if (this.Buildfloor[1] == "noKnow") {
-        params.data.Filters += `;floorId isNull`;
+        params.data.filters += `;floorId isNull`;
       } else if (this.Buildfloor[1] && this.Buildfloor[1] != "all") {
-        params.data.Filters += `;floorId='${this.Buildfloor[1]}'`;
+        params.data.filters += `;floorId='${this.Buildfloor[1]}'`;
       }
       if (this.Spacecategory) {
-        params.data.Filters += `;ObjectType='${this.Spacecategory}'`;
+        params.data.filters += `;classCode='${this.Spacecategory}'`;
       }
       if (this.keycode != "") {
-        params.data.Filters += `;RoomName contain '${this.keycode}' or RoomLocalName contain '${this.keycode}'`;
+        params.data.filters += `;name contain '${this.keycode}' or localName contain '${this.keycode}'`;
       }
       shaftUnlinkSpaceQuery(params, res => {
-        this.tableData = res.Content;
-        this.page.total = res.Total;
+        this.tableData = res.content;
+        this.page.total = res.total;
       });
     },
     handleClose() {
@@ -165,9 +165,9 @@ export default {
         let params = {
           Content: this.selections.map(item => {
             return {
-              SpaceID: item.RoomID,
-              ShaftId: this.$route.query.ShaftId,
-              ObjectType: item.ObjectType
+              spaceID: item.id,
+              shaftId: this.$route.query.ShaftId,
+              objectType: item.classCode
             };
           })
         };

+ 3 - 3
src/components/ledger/cenote/dialog/addSystemDialog.vue

@@ -98,9 +98,9 @@ export default {
     savaRelation() {
       if(this.selections.length){
         let params = {
-          ShaftId: this.params.ShaftID,
-          SysIdList: this.selections.map(item => {
-            return item.SysID
+          shaftId: this.params.ShaftID,
+          sysIdList: this.selections.map(item => {
+            return item.id
           })
         }
         linkSySh(params, res => {

+ 1 - 1
src/components/ledger/cenote/elevationMap.vue

@@ -145,7 +145,7 @@
         }
       }
       shaftZoneLink(params, res =>{
-        this.$message.success("保存成功");
+        // this.$message.success("保存成功");
         this.init();
       })
     }

+ 20 - 26
src/components/ledger/cenote/relatedSpaceList.vue

@@ -23,7 +23,7 @@
         </el-table-column>
         <el-table-column prop='localId' label='业务空间本地编码' show-overflow-tooltip min-width="200" header-align='center' align="center">
         </el-table-column>
-        <el-table-column v-if="!$route.query.onlyRead" label='操作' show-overflow-tooltip min-width="90" header-align='center' align='center'>
+        <el-table-column v-if="$route.query.onlyRead !== 'true'" label='操作' show-overflow-tooltip min-width="90" header-align='center' align='center'>
           <template slot-scope="scope">
             <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain icon="el-icon-delete"></el-button>
           </template>
@@ -116,11 +116,11 @@ export default {
           let params = {
             data: [
               {
-                ShaftId: this.$route.query.ShaftId,
-                SpaceId: row.RoomID
+                shaftId: this.$route.query.ShaftId,
+                spaceId: row.id
               }
             ],
-            type: row.ObjectType
+            type: row.classCode
           };
           this.deleteSpInSh(params);
         })
@@ -140,30 +140,24 @@ export default {
       if (val && val.length) {
         let bL = val.concat();
         bL.map(item => {
-          if (item.floor && item.floor.length) {
-
-          } else {
-            item.floor = []
-          }
-          if (!this.$route.query.onlyRead) {
-            item.floor.unshift({
-              id: "noKnow",
-              localName: "未明确建筑"
-            },{
-              id: "all",
-              localName: "全部"
-            })
-            bL.unshift({
-              id: "all",
-              localName: "全部"
-            }, {
-              id: "noKnow",
-              localName: "未明确建筑"
-            });
-          }
+          if (!(item.floor && item.floor.length))
+					item.floor = []
+					item.floor.unshift({
+						id: "all",
+						localName: "全部"
+					}, {
+						id: "noKnow",
+						localName: "未明确楼层"
+					})
         });
+				bL.unshift({
+					id: "all",
+					localName: "全部"
+				}, {
+					id: "noKnow",
+					localName: "未明确建筑"
+				})
         this.buildingData = bL;
-        console.log(this.buildingData);
       }
       else {
         this.buildingData = [];

+ 3 - 3
src/components/ledger/cenote/table/systemTable.vue

@@ -11,15 +11,15 @@
         <el-table-column :label="`${inSpaceType}名称`" show-overflow-tooltip min-width="100">
           <template slot-scope="scope">
             <div>
-              {{scope.row.SysLocalName||scope.row.SysName||''}}
+              {{scope.row.localName||scope.row.name||''}}
             </div>
           </template>
         </el-table-column>
-        <el-table-column prop="SysLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="localId" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
         <el-table-column :label="`${inSpaceType}类型`" show-overflow-tooltip min-width="100">
           <template slot-scope="scope">
             <div>
-              {{scope.row.CategoryNames.CategoryName}}
+              {{scope.row.categoryNames.categoryName}}
             </div>
           </template>
         </el-table-column>

+ 2 - 2
src/components/ledger/details/detail/cruxDialog.vue

@@ -56,7 +56,7 @@ export default {
           tmp[key] = [
             ...element.paths.map(i => ({
               InfoPointCode: i.InfoPointCode,
-              KeyWord: i.KeyWord,
+              KeyWord: i.KeyWord || false,
               type: i.type,
               code: i.InfoPointCode,
               classCode: i.classCode,
@@ -99,7 +99,7 @@ export default {
         setDataDictionary(param, res => {
           this.dialogFormVisible = false
           this.$emit('cruxSuccess')
-          this.$message('保存成功')
+          this.$message.success('保存成功')
 
         });
 

+ 11 - 30
src/components/ledger/details/detail/exhibitionBaseInformation.vue

@@ -23,18 +23,10 @@
               <span>{{ value.Value }}</span>
             </div>
           </div>
-          <div style="text-align: center; margin: 0">
-            <el-button
-              type="text"
-              size="mini"
-              v-if="value.Value &&value.InputMode != 'F2'&& value.InputMode!='N2' "
-              @click="handleCopy(value.Value)">复制
-            </el-button>
-          </div>
-          <!--        <el-button slot="reference" type="text">{{value.Value ? '有' :'-'}}</el-button>-->
+
           <el-button slot="reference" type="text">有</el-button>
         </el-popover>
-        <span v-else-if="Array.isArray(value.Value) && value.InputMode== 'F2' ">
+        <span v-else-if="Array.isArray(value.Value) && value.dataType== 'ATTACHMENT' ">
         <el-popover
           v-if="value.Value.length "
           placement="right"
@@ -42,35 +34,20 @@
           trigger="hover">
           <p style="border-bottom: 1px solid #eee;padding:2px 0 4px 0;'">{{ value.InfoPointName }}</p>
           <div v-for="(pic,index) in value.Value">
-            <div>图纸名称:{{ pic.Name }}
-              <!--              <el-button style="" type="text" size="mini" @click="downloadFile(pic.Key)">下载</el-button>-->
+            <div>图纸名称:{{ pic.name}}
               <a
                 style="cursor: pointer;color: #409eff"
-                :href="`/image-service/common/file_get/${pic.Key}?systemId=dataPlatform`"
-                :download="pic.Name"
+                :href="`/image-service/common/image_get?systemId=dataPlatform&key=${pic.key}`"
+                :download="pic.name"
               >下载</a>
             </div>
           </div>
-          <!--          <el-button slot="reference" type="text">{{value.Value.length >0 ? '有':'-'}}</el-button>-->
           <el-button slot="reference" type="text">有</el-button>
         </el-popover>
         <span v-else>-</span>
       </span>
 
         <el-popover
-          v-else-if="Array.isArray(value.Value) && value.InputMode=='N2'"
-          placement="right"
-          width="400"
-          trigger="hover">
-          <p style="border-bottom: 1px solid #eee;padding:2px 0 4px 0;'">{{ value.InfoPointName }}</p>
-          <p style="height: 250px;overflow: auto">{{ value.Value }}</p>
-          <div style="text-align: center; margin: 0">
-            <el-button type="text" size="mini" @click="handleCopy(value.Value)">复制</el-button>
-          </div>
-          <!--        <el-button slot="reference" type="text">{{value.Value.length >0  ? '有' :'-'}}</el-button>-->
-          <el-button slot="reference" type="text">有</el-button>
-        </el-popover>
-        <el-popover
           v-else-if="value.Value && value.Value.length  && `${value.InfoPointName}:${value.Value}`.length>21 "
           placement="right"
           width="160"
@@ -114,8 +91,12 @@ export default {
       oInput.remove()
     },
     handleName(infoPoint, val) {
-      let text = `${infoPoint}:${val}`;
-      return text.length > 21 ? val.substring(0, 21 - `${infoPoint}:`.length) + '...' : val;
+        let value = val;
+        if (Array.isArray(value)) {
+          value = JSON.stringify(val)
+        }
+      let text = `${infoPoint}:${value}`;
+      return text.length > 21 ? value.substring(0, 21 - `${infoPoint}:`.length) + '...' : value;
     }
   }
 }

+ 109 - 114
src/components/ledger/details/detail/exhibitionCrux.vue

@@ -2,76 +2,64 @@
   <section class="exhibition-crux">
     <p class="title">
       <span class="iconfont icon-juxing"></span>
-      {{exhibitionCrux.title}}
+      {{ exhibitionCrux.title }}
       <span class="icon-shezhi iconfont setting" @click="setting"></span></p>
     <div>
       <div v-if="exhibitionCrux.cruxArray.length">
-        <div class="crux-list" v-for="(item,index) in exhibitionCrux.cruxArray" :key="index">{{item.name}}:
+        <div class="crux-list" v-for="(item,index) in exhibitionCrux.cruxArray" :key="index">{{ item.name }}:
 
-        <el-popover
-          v-if="item.Path == 'equipQRCode' || item.Path == 'roomQRCode' || item.Path == 'shaftQRCode'"
-          placement="top"
-          width="360"
-          trigger="hover">
-          <p style="border-bottom: 1px solid #eee;padding:2px 0 4px 0;'">{{item.InfoPointName}}</p>
-          <div style="overflow:hidden;">
-            <div style="float:left;width: 60%">
-              <img
-                style="width:200px;height:200px;"
-                :src="'/image-service/common/file_get/'+ item.value +'?systemId=dataPlatform'"
-                alt="二维码"
-              >
+          <el-popover
+            v-if="item.Path == 'equipQRCode' || item.Path == 'roomQRCode' || item.Path == 'shaftQRCode'"
+            placement="top"
+            width="360"
+            trigger="hover">
+            <p style="border-bottom: 1px solid #eee;padding:2px 0 4px 0;'">{{ item.InfoPointName }}</p>
+            <div style="overflow:hidden;">
+              <div style="float:left;width: 60%">
+                <img
+                  style="width:200px;height:200px;"
+                  :src="'/image-service/common/file_get/'+ item.value +'?systemId=dataPlatform'"
+                  alt="二维码"
+                >
+              </div>
+              <div style="float:right;width: 40%;margin-top: 30px">
+                <span>{{ item.value }}</span>
+              </div>
             </div>
-            <div style="float:right;width: 40%;margin-top: 30px">
-              <span>{{item.value}}</span>
+            <div style="text-align: center; margin: 0">
+              <el-button type="text" size="mini" @click="handleCopy(item.value)">复制</el-button>
             </div>
-          </div>
-          <div style="text-align: center; margin: 0">
-            <el-button type="text" size="mini" @click="handleCopy(item.value)">复制</el-button>
-          </div>
-          <el-button slot="reference" type="text">{{item.value ? '有' :'-'}}</el-button>
-        </el-popover>
-        <el-popover
-          v-else-if="Array.isArray(item.value) && item.InputMode== 'F2'"
-          placement="right"
-          width="250"
-          trigger="hover">
-          <p style="border-bottom: 1px solid #eee;padding:2px 0 4px 0;'">{{item.InfoPointName}}</p>
-          <div v-for="(pic,index) in item.value">
-            <div>图纸名称:{{pic.Name}}
-                <el-button style="" type="text" size="mini" @click="downloadFile(pic.Key)">下载</el-button>
+            <el-button slot="reference" type="text">{{ item.value ? '有' : '-' }}</el-button>
+          </el-popover>
+          <el-popover
+            v-else-if="Array.isArray(item.value) && item.dataType== 'ATTACHMENT'"
+            placement="right"
+            width="250"
+            trigger="hover">
+            <p style="border-bottom: 1px solid #eee;padding:2px 0 4px 0;'">{{ item.InfoPointName }}</p>
+            <div v-for="(pic,index) in item.value">
+              <div>图纸名称:{{ pic.name }}
+                <el-button size="mini" style="" type="text" @click="downloadFile(pic.key)">下载</el-button>
+              </div>
             </div>
-          </div>
-          <el-button slot="reference" type="text">{{item.value? '有':'-'}}</el-button>
-        </el-popover>
-        <el-popover
-          v-else-if="Array.isArray(item.value) && item.InputMode=='N2'"
-          placement="right"
-          width="600"
-          trigger="hover">
-          <p style="border-bottom: 1px solid #eee;padding:2px 0 4px 0;'">{{item.InfoPointName}}</p>
-          <p style="height: 300px;overflow: auto">{{item.value}}</p>
-          <div style="text-align: center; margin: 0">
-            <el-button type="text" size="mini" @click="handleCopy(item.value)">复制</el-button>
-          </div>
-          <el-button slot="reference" type="text">{{item.value ? '有' :'-'}}</el-button>
-        </el-popover>
-        <el-popover
-          v-else-if="item.value && item.value.length && `${item.InfoPointName}:${item.value}`.length>21"
-          placement="top"
-          width="160"
-          trigger="hover">
-          <p style="border-bottom: 1px solid #eee;padding:2px 0 4px 0;'">{{item.InfoPointName}}</p>
-          <p>{{item.value}}</p>
-          <div style="text-align: center; margin: 0">
-            <el-button type="text" size="mini" @click="handleCopy(item.value)">复制</el-button>
-          </div>
-          <el-button slot="reference" type="text">{{handleName(item.InfoPointName, item.value)}}</el-button>
-        </el-popover>
-        <span v-else>{{item.value}}</span>
+            <el-button slot="reference" type="text">{{ item.value ? '有' : '-' }}</el-button>
+          </el-popover>
+
+          <el-popover
+            v-else-if="item.value && item.value.length && `${item.InfoPointName}:${item.value}`.length>21"
+            placement="top"
+            width="160"
+            trigger="hover">
+            <p style="border-bottom: 1px solid #eee;padding:2px 0 4px 0;'">{{ item.InfoPointName }}</p>
+            <p>{{ item.value }}</p>
+            <div style="text-align: center; margin: 0">
+              <el-button type="text" size="mini" @click="handleCopy(item.value)">复制</el-button>
+            </div>
+            <el-button slot="reference" type="text">{{ handleName(item.InfoPointName, item.value) }}</el-button>
+          </el-popover>
+          <span v-else>{{ item.value }}</span>
         </div>
       </div>
-      <!-- <div style="text-align: center" v-else>暂无数据</div> -->
     </div>
     <cruxDialog
       ref="setting"
@@ -84,69 +72,76 @@
 </template>
 
 <script>
-  import cruxDialog from "./cruxDialog";
+import cruxDialog from "./cruxDialog";
 
-  export default {
-    name: "exhibition-crux",
-    props: ['exhibitionCrux','type'],
-    components: {cruxDialog},
-    data() {
-      return {
-        list: []
-      }
+export default {
+  name: "exhibition-crux",
+  props: ['exhibitionCrux', 'type'],
+  components: { cruxDialog },
+  data() {
+    return {
+      list: []
+    }
+  },
+  methods: {
+    downloadFile(key) {
+      window.open("/image-service/common/file_get/" + key + "?systemId=dataPlatform")
     },
-    methods: {
-      downloadFile(key) {
-        window.open("/image-service/common/file_get/" + key + "?systemId=dataPlatform")
-      },
-      setting() {
-        this.$refs.setting.dialogOpen()
-      },
-      cruxSuccess() {
-        this.$emit('cruxSuccess')
-      },
-      handleCopy(data) {
-        let oInput = document.createElement('input')
-        oInput.value = data
-        document.body.appendChild(oInput)
-        oInput.select()
-        document.execCommand('Copy')
-        this.$message.success('复制成功')
-        oInput.remove()
-      },
-      handleName(infoPoint, val) {
-        let text = `${infoPoint}:${val}`;
-        return text.length > 21 ? val.substring(0, 21-`${infoPoint}:`.length) + '...' : val;
+    setting() {
+      this.$refs.setting.dialogOpen()
+    },
+    cruxSuccess() {
+      this.$emit('cruxSuccess')
+    },
+    handleCopy(data) {
+      let oInput = document.createElement('input')
+      oInput.value = data
+      document.body.appendChild(oInput)
+      oInput.select()
+      document.execCommand('Copy')
+      this.$message.success('复制成功')
+      oInput.remove()
+    },
+    handleName(infoPoint, val) {
+      let value = val;
+      if (Array.isArray(value)) {
+        value = JSON.stringify(val)
       }
+      let text = `${infoPoint}:${value}`;
+      return text.length > 21 ? value.substring(0, 21 - `${infoPoint}:`.length) + '...' : value;
     }
   }
+}
 </script>
 
 <style lang="less" scoped>
-  .exhibition-crux {
-    padding: 10px 0;
-    /deep/ .el-button--text {
-      color: #555 !important;
-      font-size: 14px;
-    }
-    .title {
-      /*border-left: 8px solid black;*/
-      margin: 0 20px 0 10px;
-      font-weight: 600;
-      /*text-indent: 10px;*/
-      display: block;
-      overflow: hidden;
+.exhibition-crux {
+  padding: 10px 0;
 
-      .setting {
-        float: right;
-      }
+  /deep/ .el-button--text {
+    color: #555 !important;
+    font-size: 14px;
+  }
 
+  .title {
+    /*border-left: 8px solid black;*/
+    margin: 0 20px 0 10px;
+    font-weight: 600;
+    /*text-indent: 10px;*/
+    display: block;
+    overflow: hidden;
+
+    .setting {
+      float: right;
     }
-      .crux-list {
-        display: inline-block;
-        width: 315px;
-        margin-left: 20px;
-        vertical-align: text-top;
-      }
+
+  }
+
+  .crux-list {
+    display: inline-block;
+    width: 315px;
+    margin-left: 20px;
+    vertical-align: text-top;
   }
+}
 </style>

+ 24 - 4
src/components/ledger/details/detail/exhibitionEnergy.vue

@@ -5,7 +5,7 @@
         <h4 class="base">{{key}}</h4>
         <div class="table-dynamic" v-for="(value,keys,index) in val.paths">
           <div class="table-title"> {{ value.InfoPointName }}:</div>
-          <p :style="{'color':value.value? '' :'#F56C6C'}">{{ value.value ? `表号功能号:${value.value} ` : '未维护' }}</p>
+          <p class="iot_data" :style="{'color':value.value? '' :'#F56C6C'}" :title="value.value ? `${value.value}` : '未维护'">{{ value.value ? `${value.value}` : '未维护' }}</p>
           <p v-if="value.data == '0'">{{ value.data }}{{ value.Unit }}</p>
           <p v-else-if="value.data">{{ value.data }}{{ value.Unit }}</p>
           <!--          <p v-else-if="value.error">{{value.error}}</p>-->
@@ -15,9 +15,9 @@
             width="160"
             trigger="hover">
             <p style="border-bottom: 1px solid #eee;padding:2px 0 4px 0;'">错误原因</p>
-            <p>{{ value.error }}</p>
+            <p>{{ '表号功能号不存在' }}</p>
             <div style="text-align: center; margin: 0">
-              <el-button type="text" size="mini" @click="handleCopy(value.error)">复制</el-button>
+              <el-button type="text" size="mini" @click="handleCopy(value.error)">复制错误信息</el-button>
             </div>
             <el-button slot="reference" type="text" style="color:#F56C6C">error</el-button>
           </el-popover>
@@ -36,7 +36,21 @@
     props: ['exhibitionEnergy'],
     methods:{
       formatDate(str) {
-        return str ? str.substr(0,4)+"-"+str.substr(4,2)+"-"+str.substr(6,2)+" "+str.substr(8,2) + ":" +str.substr(10,2) + ":"+str.substr(12,2) :'--'
+        if (str) {
+          if (str.includes('-')) {
+            return str
+          } else {
+            if (str.length > 8) {
+              return str.substr(0, 4) + "-" + str.substr(4, 2) + "-" + str.substr(6, 2) + " " + str.substr(8, 2) + ":" + str.substr(10, 2) + ":" + str.substr(12, 2)
+            } else if (str === 'null') {
+                return '--'
+            }else {
+                return str.substr(0, 4) + "-" + str.substr(4, 2) + "-" + str.substr(6, 2) + " " + str.substr(8, 2)
+            }
+          }
+        } else {
+          return '--'
+        }
       },
       handleCopy(data) {
         let oInput = document.createElement('input')
@@ -68,6 +82,12 @@
       box-sizing: border-box;
     }
 
+    .iot_data {
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }
+
     .table-title {
       float: left;
       max-width: 200px;

+ 14 - 2
src/components/ledger/details/detail/exhibitionEnergyO.vue

@@ -25,8 +25,20 @@
     props: ['exhibitionEnergy'],
     methods:{
       formatDate(str) {
-        return str ? str.substr(0,4)+"-"+str.substr(4,2)+"-"+str.substr(6,2)+" "+str.substr(8,2) + ":" +str.substr(10,2) + ":"+str.substr(12,2) :'--'
-      }
+        if (str) {
+          if (str.includes('-')) {
+            return str
+          } else {
+            if (str.length > 8) {
+              return str.substr(0, 4) + "-" + str.substr(4, 2) + "-" + str.substr(6, 2) + " " + str.substr(8, 2) + ":" + str.substr(10, 2) + ":" + str.substr(12, 2)
+            } else {
+              return str.substr(0, 4) + "-" + str.substr(4, 2) + "-" + str.substr(6, 2) + " " + str.substr(8, 2)
+            }
+          }
+        } else {
+          return '--'
+        }
+      },
     }
   }
 </script>

+ 33 - 234
src/components/ledger/handsontables/assets.vue

@@ -22,16 +22,6 @@
       </el-button>
     </div>
     <qrcode :qrcodeUrl="qrcodeUrl" :dialog="myDialog" :addBody="true" ref="qrcode"/>
-    <firm
-      :firmDataType="firmDataType"
-      ref="firm"
-      :mess="mess"
-      @changeFirm="firmChange"
-      :dialog="myDialog"
-    />
-    <supply-dialog @change="supplyChange" ref="supply" :id="id" :dialog="myDialog"/>
-    <supplier-dialog :firmDataType="firmDataType" ref="supplier" @changeSupplier="supplierChange" :dialog="myDialog"/>
-    <guarantee-dialog @change="guaranteeChange" :id="id" ref="guarantee" :dialog="myDialog"/>
     <upload-files-dialog
       :read="onlyRead ? true : false"
       ref="upload"
@@ -49,18 +39,6 @@
       :firmDataType="firmDataType"
       :infoType="infoType"
     />
-    <maintainer-dialog
-      @changeMaintainer="changeMaintainer"
-      ref="maintainer"
-      :dialog="myDialog"
-      :firmDataType="firmDataType"
-    />
-    <insurer-dialog
-      @changeInsurer="changeInsurer"
-      ref="insurer"
-      :dialog="myDialog"
-      :firmDataType="firmDataType"
-    />
     <pic-dialog
       :read="onlyRead ? true : false"
       :dialog="myDialog"
@@ -151,40 +129,27 @@ import {
   queryProperty,
   updateProperty
 } from "@/api/scan/request";
-import { getDataDictionary } from "@/api/dict";
+import {getDataDictionary} from "@/api/dict";
 import tools from "@/utils/scan/tools"
 import handsonUtils from "@/utils/scan/hasontableUtils"
 import showTools from "@/utils/handsontable/notShow"
 import buildFloor from '@/utils/handsontable/buildFloorData'
-import firm from "@/components/dialogs/list/firm"
-import supplierDialog from "@/components/dialogs/list/supplierDialog"
 import uploadFilesDialog from "@/components/dialogs/list/filesDialog"
 import uploadImgDialog from "@/components/dialogs/list/uploadImgDialog"
-import maintainerDialog from "@/components/dialogs/list/maintainerDialog"
-import insurerDialog from "@/components/dialogs/list/insurerDialog"
 import picDialog from "@/components/dialogs/list/picDialog"
 
 import qrcode from "@/components/business_space/lib/qrcode"
-// import firm from "@/components/business_space/dialogs/list/firm"
-import supplyDialog from "@/components/business_space/dialogs/list/supplyDialog"
-// import supplierDialog from "@/components/business_space/dialogs/list/supplierDialog"
-// import maintainerDialog from "@/components/business_space/dialogs/list/maintainerDialog"
-// import insurerDialog from "@/components/business_space/dialogs/list/insurerDialog"
-import guaranteeDialog from "@/components/business_space/dialogs/list/guaranteeDialog"
-// import uploadFilesDialog from "@/components/business_space/dialogs/list/filesDialog"
-// import uploadImgDialog from "@/components/business_space/dialogs/list/uploadImgDialog"
-// import detailsDialog from "@/components/business_space/lib/detailsDia"
-// import picDialog from "@/components/business_space/dialogs/list/picDialog"
 import myPagination from "@/components/common/myPagination"
 import myCascader from "@/components/ledger/lib/assets"
 import floorCascader from "@/components/ledger/lib/floorCascader"
 import dieCascader from "@/components/ledger/lib/partsDieList"
-import { mapGetters } from "vuex"
+import {mapGetters} from "vuex"
 //图片查看
 import lookPic from "@/components/ledger/lib/lookImages"
 import Handsontable from "handsontable-pro"
 import 'handsontable-pro/dist/handsontable.full.css'
 import batchDialog from "../../dialogs/list/batchDialog";
+import dataTypeMap from "@/utils/handsontable/dataTypeMap"
 //下拉插件
 // import "@/assets/js/chosen.jquery.min";
 // import "@/assets/js/handsontable-chosen-editor";
@@ -192,13 +157,7 @@ import batchDialog from "../../dialogs/list/batchDialog";
 export default {
   components: {
     qrcode, //二维码页面
-    firm, //
-    supplyDialog,
-    supplierDialog,
-    guaranteeDialog,
     uploadFilesDialog,
-    maintainerDialog,
-    insurerDialog,
     uploadImgDialog,
     picDialog,
     myPagination,
@@ -214,11 +173,11 @@ export default {
     buildFloor.getData(this.buildFloorData)
   },
   computed: {
-    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+    ...mapGetters("layout", ["projectId", "secret", "userId", 'group_code']),
     showTypes() {
       return this.onlyRead ?
-        [{ value: "Visible", label: '只看采集信息' }, { value: "all", label: '全部' }] :
-        [{ value: "partInfo", label: '隐藏信息点' }, { value: "Visible", label: '只看采集信息' }, { value: "all", label: '全部' }]
+        [{value: "Visible", label: '只看采集信息'}, {value: "all", label: '全部'}] :
+        [{value: "Visible", label: '只看采集信息'}, {value: "all", label: '全部'}]
     }
   },
   data() {
@@ -253,12 +212,6 @@ export default {
       },
       myDialog: {
         qrcode: false, //二维码弹窗
-        firm: false, //厂商弹窗
-        supply: false, //选择供应合同
-        supplier: false, //供应商选择
-        guarantee: false, //选择保单
-        maintainer: false, //选择维修商
-        insurer: false, //选择保险公司
         uploadFiles: false,//上传文件
         uploadImgs: false,//上传单个图片
         pic: false, //多个图片
@@ -298,11 +251,12 @@ export default {
       dieNum: 0, // 查询设备部件数量
       inputMap: {
         flowBuild: {
-          inputMode: 'D1',
           editable: true,
           code: "flowBuild",
           name: "建筑楼层",
-          path: "flowBuild"
+          path: "flowBuild",
+          category: 'STATIC',
+          dataType: "ENUM"
         }
       }, //信息点和输入方式映射表
       updateInputShow: false, //是否显示临时维护输入框
@@ -341,7 +295,7 @@ export default {
           this.getTableData()
           this.getAllData()
           //  信息维护
-          this.newEnclosure = res.content.filter(i => i.inputMode == 'F2')
+          this.newEnclosure = res.content.filter(i => i.dataType == dataTypeMap.ATTACHMENT)
         });
       }
     },
@@ -446,18 +400,13 @@ export default {
     //获取动态参数
     getBatch(data) {
       let param = {
-        groupCode: "WD",
+        groupCode: this.group_code,
         appId: "datacenter",
         projectId: this.projectId,
         data: []
       };
       this.tableHeader.map(head => {
-        if (
-          head.inputMode == "L" ||
-          head.inputMode == "L1" ||
-          head.inputMode == "L2" ||
-          head.inputMode == "M"
-        ) {
+        if (head.category != 'STATIC') {
           data.map(item => {
             let cur = tools.dataForKey(item, head.path);
             if (cur) {
@@ -490,8 +439,7 @@ export default {
                       tools.setDataForKey(
                         item,
                         head.path,
-                        child.error
-                        // child.error ? child.value ? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
+                        child.error ? child.value ? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
                       );
                     }
                   });
@@ -696,6 +644,7 @@ export default {
         // colWidths: 200,
         autoColumnSize: true,
         language: "zh-CN",
+        fillHandle: 'vertical', //允许纵向填充
         manualColumnResize: true,
         manualColumnMove: true,
         dropdownMenu: [
@@ -781,7 +730,8 @@ export default {
       }
       let param = []
       params.map(item => {
-        param.push({ EquipID: item.EquipID })
+        this.deleteCode = item.family;
+        param.push({ id: item.id })
       })
       this.$confirm("此操作将删除资产,是否继续?", "提示", {
         confirmButtonText: '确定',
@@ -798,7 +748,7 @@ export default {
     async removeDevice(param) {
       await deleteProperty(param, res => {
         this.$message.success("删除成功")
-        this.$emit('getJson', '')
+        this.$emit('close', {code: this.deleteCode})
         this.getTableData()
       })
     },
@@ -806,7 +756,8 @@ export default {
     updateProperty(data, change) {
       let param = {
         content: [],
-        projection: []
+        projection: [],
+        nullItems: []
       }, keyList = []
       //生成要修改字段列表
       change.map(item => {
@@ -821,6 +772,10 @@ export default {
         if (item[1] && item[3] == "" && param.projection.indexOf(key) == -1) {
           param.projection.push(key)
         }
+        // 保存置空字段
+        if (item[1] && item[3] == "" && param.nullItems.indexOf(item[1]) == -1) {
+          param.nullItems.push(item[1])
+        }
       })
       //生成对应修改数据
       data.map((item, index) => {
@@ -922,62 +877,6 @@ export default {
             this.myDialog.changeRea = true;
           }
           return false
-        //品牌型号弹窗
-        case 'dpManufacturerId':
-          if (!this.onlyRead) {
-            this.myDialog.firm = true;
-          }
-          return false
-        //供应商信息弹窗
-        case 'dpSupplierId':
-          if (!this.onlyRead) {
-            this.myDialog.supplier = true;
-          }
-          return false
-        //维修商信息弹窗
-        case 'dpMaintainerId':
-          if (!this.onlyRead) {
-            this.myDialog.maintainer = true;
-          }
-          return false
-        //保险公司信息
-        case 'dpInsurerId':
-          if (!this.onlyRead) {
-            this.myDialog.insurer = true;
-          }
-          return false
-        //供应合同编号
-        case 'infos.supplierContractID':
-          if (!this.onlyRead) {
-            let ContractIDflag = null;
-            let DPSdata = this.tableData[row.row].dpSupplierId;
-            if (DPSdata) {
-              ContractIDflag = DPSdata.split("-")[0];
-            }
-            if (!!ContractIDflag) {
-              this.id = ContractIDflag;
-              this.myDialog.supply = true;
-            } else {
-              this.$message("请先选择供应商");
-            }
-          }
-          return false
-        //保险单号
-        case 'infos.insuranceNum':
-          if (!this.onlyRead) {
-            let DPInsurerIDflag = null;
-            let DPIdata = this.tableData[row.row].dpInsurerId;
-            if (DPIdata) {
-              DPInsurerIDflag = DPIdata.split("-")[0];
-            }
-            if (!!DPInsurerIDflag) {
-              this.id = DPInsurerIDflag;
-              this.myDialog.guarantee = true;
-            } else {
-              this.$message("请先选择保险商");
-            }
-          }
-          return false
         //保险文件--资产文档--安装质检报告
         case 'infos.insuranceFile': //保险文件
         case 'infos.archive': //设备文档
@@ -1025,10 +924,16 @@ export default {
           break;
       }
       if (!this.onlyRead && !inputData.editable) {
-        this.$message("该信息点的值为自动生成,不可人工维护!");
-        return false;
+        this.$confirm('该信息点的值为自动生成,不可人工维护!', '提示', {
+            confirmButtonText: '我知道了',
+            showCancelButton: false,
+            type: 'warning',
+            center: true
+        }).then(() => {
+            return false;
+        });
       }
-      if (!this.onlyRead && showTools.inputModeArr.indexOf(inputData.inputMode) == '-1') {
+      if (!this.onlyRead && showTools.inputModeArr.indexOf(inputData.dataType) == '-1') {
         this.updateInfoPoint = val;
         this.updateInput = tools.dataForKey(this.tableData[row.row], val);
         this.myDialog.update = true;
@@ -1076,112 +981,6 @@ export default {
       }
       return a;
     },
-    //如果选择供应商之后
-    supplierChange(data, type) {
-      if (type === 'dialog') {
-        let firm = { ...data, num: 8 }
-        this.firmName = firm
-      } else {
-        tools.setDataForKey(this.tableData[this.row], "dpSupplierId", data.venderId)
-        tools.setDataForKey(this.tableData[this.row], "infos.supplier", data.name)
-        this.handleUpdataTable(
-          [
-            [this.row, "dpSupplierId", null, data.venderId],
-            [this.row, "infos.supplier", null, data.name]
-          ],
-          "edit"
-        )
-        // this.handleUpdataTable([[this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]], "edit")
-      }
-    },
-    //供应合同编号
-    supplyChange(data) {
-      tools.setDataForKey(this.tableData[this.row], "infos.supplierContractID", { id: data })
-    },
-    //保险单号-保险文件
-    guaranteeChange(data) {
-      for (let key in data) {
-        this.utilToKey(key, "insuranceNo", data, "insuranceNum")
-        if (key == "contractFile") {
-          if (!!data[key]) {
-            data[key] = [data[key]]
-          }
-        }
-        this.utilToKey(key, "contractFile", data, "insuranceFile")
-      }
-    },
-    //选择型号修改
-    firmChange(data, type) {
-      if (type === 'dialog') { // 如果是批量信息维护
-        let venderName = data.venderName ? data.venderName : '空'
-        let brandName = data.brandName ? data.brandName : '空'
-        let name = data.name ? data.name : '空'
-        let firm = {
-          ...data,
-          num: 2,
-          Specification: data.name,
-          name: `${venderName}/${brandName}/${name}`
-        }
-        this.firmName = firm //批量维护dialog显示对象的字段
-      } else {
-        tools.setDataForKey(this.tableData[this.row], "dpManufacturerId", data.venderId)//生产商ID
-        tools.setDataForKey(this.tableData[this.row], "dpBrandId", data.brandId)//品牌ID
-        tools.setDataForKey(this.tableData[this.row], "dpSpecificationId", data.specificationId)//型号ID
-        tools.setDataForKey(this.tableData[this.row], "infos.manufacturer", data.venderName)
-        tools.setDataForKey(this.tableData[this.row], "infos.brand", data.brandName)
-        tools.setDataForKey(this.tableData[this.row], "infos.specification", data.name)
-        this.handleUpdataTable(
-          [
-            [this.row, "dpManufacturerId", null, data.venderId],
-            [this.row, "dpBrandId", null, data.brandId],
-            [this.row, "dpSpecificationId", null, data.specificationId],
-            [this.row, "infos.manufacturer", null, data.venderName],
-            [this.row, "infos.brand", null, data.brandName],
-            [this.row, "infos.specification", null, data.name]
-          ],
-          "edit"
-        )
-        // this.handleUpdataTable([[this.row, "LedgerParam.equipManufactor.Brand", null, data.brand]], "edit")
-        // this.handleUpdataTable([[this.row, "LedgerParam.equipManufactor.Specification", null, data.name]], "edit")
-      }
-    },
-    //保险商变更
-    changeInsurer(data, type) {
-      if (type === 'dialog') {
-        let firm = { ...data, num: 42 }
-        this.firmName = firm
-      } else {
-        tools.setDataForKey(this.tableData[this.row], "dpInsurerId", data.venderId)
-        tools.setDataForKey(this.tableData[this.row], "infos.insurer", data.name)
-        this.handleUpdataTable(
-          [
-            [this.row, "dpInsurerId", null, data.venderId],
-            [this.row, "infos.insurer", null, data.name]
-          ],
-          "edit"
-        )
-        // this.handleUpdataTable([[this.row, "LedgerParam.InsuranceDoc.Insurer", null, data.name]], "edit")
-      }
-    },
-    //维修商变更
-    changeMaintainer(data, type) {
-      if (type === 'dialog') {
-        let firm = { ...data, num: 35 }
-        this.firmName = firm
-      } else {
-
-        tools.setDataForKey(this.tableData[this.row], "dpMaintainerId", data.venderId)
-        tools.setDataForKey(this.tableData[this.row], "infos.maintainer", data.name)
-        this.handleUpdataTable(
-          [
-            [this.row, "dpMaintainerId", null, data.venderId],
-            [this.row, "infos.maintainer", null, data.name]
-          ],
-          "edit"
-        )
-        // this.handleUpdataTable([[this.row, "LedgerParam.operationMainte.maintainer", null, data.name]], "edit")
-      }
-    },
     //修改关联的资产
     changeProperty(val) {
       this.setDataToMain(val.propertyId, 'propertyId', this.row);
@@ -1457,7 +1256,7 @@ export default {
         if (newName && newName[0] && newName[0].value) {
           this.showType = newName[0].value
         } else {
-          this.showType = ""
+          this.showType = "Visible"
         }
       },
       immediate: true,

+ 125 - 438
src/components/ledger/handsontables/device.vue

@@ -4,7 +4,8 @@
       <div style="float:right;overflow:hidden;">
         <span>当前筛选条件下共{{ page.total || "--" }}设备</span>
       </div>
-      <el-select v-model="onlyRead" @change="getHeaderData(mess)" style="width:100px;margin-right:20px;vertical-align:bottom;">
+      <el-select v-model="onlyRead" @change="getHeaderData(mess)"
+                 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>
       <el-select v-model="showType" @change="initTable" style="width:100px;margin-right:10px;vertical-align:bottom;">
@@ -24,30 +25,24 @@
     <!-- 二维码弹窗 -->
     <qrcode :dialog="myDialog" :qrcodeUrl="qrcodeUrl" :addBody="true" ref="qrcode"></qrcode>
     <!-- bim坐标弹框 -->
-    <bimDialog :dialog="myDialog" :bimcodeobj="bimcodeobj" @closeBIM="closeBIM" :addBody="true" ref="bimdialog"></bimDialog>
-    <!-- 型号弹窗 -->
-    <firm :mess="{ deviceId: deviceType.assetType }" :firmDataType="firmDataType" ref="firm" @changeFirm="firmChange" :dialog="myDialog"></firm>
-    <!-- 供应商合同弹窗 -->
-    <supply-dialog ref="supply" @change="supplyChange" :id="id" :dialog="myDialog" />
-    <!-- 供应商弹窗 -->
-    <supplier-dialog ref="supplier" :firmDataType="firmDataType" @changeSupplier="supplierChange" :dialog="myDialog" />
-
-    <guarantee-dialog :id="id" ref="guarantee" @change="guaranteeChange" :dialog="myDialog" />
+    <bimDialog :dialog="myDialog" :bimcodeobj="bimcodeobj" @closeBIM="closeBIM" :addBody="true"
+               ref="bimdialog" :read="onlyRead ? true : false"></bimDialog>
     <!--      上传文件-->
-    <upload-files-dialog :read="onlyRead ? true : false" ref="upload" @changeFile="fileChange" :keysArr="filesArr" :firmDataType="firmDataType"
-      :information="information" :infoType="infoType" :dialog="myDialog" />
+    <upload-files-dialog :read="onlyRead ? true : false" ref="upload" @changeFile="fileChange" :keysArr="filesArr"
+                         :firmDataType="firmDataType"
+                         :information="information" :infoType="infoType" :dialog="myDialog"/>
     <!--      上传图片-->
-    <upload-img-dialog :read="onlyRead ? true : false" @changeFile="imgChange" :keysArr="imgsArr" :dialog="myDialog" :firmDataType="firmDataType"
-      :information="information" :infoType="infoType" />
-    <!--      维修商信息-->
-    <maintainer-dialog @changeMaintainer="changeMaintainer" :firmDataType="firmDataType" ref="maintainer" :dialog="myDialog" />
-    <insurer-dialog @changeInsurer="changeInsurer" :firmDataType="firmDataType" ref="insurer" :dialog="myDialog" />
-    <pic-dialog :read="onlyRead ? true : false" :dialog="myDialog" :keysArr="picsArr" @change="changePics" :firmDataType="firmDataType"
-      :information="information" :infoType="infoType" />
-    <div class="middle_sty" style="height: 91%; text-align:center" v-show="!mess.deviceId && (!tableData || !tableData.length)">
+    <upload-img-dialog :read="onlyRead ? true : false" @changeFile="imgChange" :keysArr="imgsArr" :dialog="myDialog"
+                       :firmDataType="firmDataType"
+                       :information="information" :infoType="infoType"/>
+    <pic-dialog :read="onlyRead ? true : false" :dialog="myDialog" :keysArr="picsArr" @change="changePics"
+                :firmDataType="firmDataType"
+                :information="information" :infoType="infoType"/>
+    <div class="middle_sty" style="height: 91%; text-align:center"
+         v-show="!mess.deviceId && (!tableData || !tableData.length)">
       <p>
         <i class="icon-wushuju iconfont"></i>
-        请选择设备
+        请选择设备类别
       </p>
     </div>
 
@@ -64,8 +59,9 @@
     </div>
     <details-dialog :iframeSrc="iframeSrc" v-if="myDialog.details" :dialog="myDialog"></details-dialog>
     <!-- 关联的系统 -->
-    <system-type :device="mess" :curDevice="curDevice" :dialog="myDialog" :type="onlyRead ? 'read' : 'edit'" @change="changeSystemType"
-      :list="systemList"></system-type>
+    <system-type :device="mess" :curDevice="curDevice" :dialog="myDialog" :type="onlyRead ? 'read' : 'edit'"
+                 @change="changeSystemType"
+                 :list="systemList"></system-type>
     <!-- 关联资产 -->
     <change-rea @changeProperty="changeProperty" :dialog="myDialog" :category="deviceType"></change-rea>
     <look-pic :dialog="myDialog" :keysArr="picsArr"></look-pic>
@@ -78,7 +74,8 @@
       </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-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>
@@ -95,14 +92,16 @@
       </span>
     </el-dialog>
     <!--      维护信息弹窗-->
-    <batchDialog ref="batchDialogs" @code="fourVendors" :firmName="firmName" :allObject="allObject" :page="batchPage" :information="information"
-      :newEnclosure="newEnclosure" @getAllData="getAllData" @multiples="multiples" @upDataDevice="upDataDevice" />
+    <batchDialog ref="batchDialogs" @code="fourVendors" :firmName="firmName" :allObject="allObject" :page="batchPage"
+                 :information="information"
+                 :newEnclosure="newEnclosure" @getAllData="getAllData" @multiples="multiples"
+                 @upDataDevice="upDataDevice"/>
   </div>
 </template>
 <script>
-import { BeatchQueryParam, deleteEquip, getEquipBelongs, queryUpdate, updateEquip } from "@/api/scan/request";
-import { getEquipTableCon, queryEquip } from "@/api/object/equip";
-import { getDataDictionary } from "@/api/dict";
+import {BeatchQueryParam, deleteEquip, getEquipBelongs, queryUpdate, updateEquip} from "@/api/scan/request";
+import {getEquipTableCon, queryEquip} from "@/api/object/equip";
+import {getDataDictionary} from "@/api/dict";
 
 import tools from "@/utils/scan/tools";
 import handsonUtils from "@/utils/hasontableUtils";
@@ -113,12 +112,6 @@ import buildFloor from "@/utils/handsontable/buildFloorData";
 
 import qrcode from "@/components/ledger/lib/qrcode";
 import bimDialog from "@/components/ledger/lib/bimDialog";
-import firm from "@/components/dialogs/list/firm";
-import supplyDialog from "@/components/dialogs/list/supplyDialog";
-import supplierDialog from "@/components/dialogs/list/supplierDialog";
-import maintainerDialog from "@/components/dialogs/list/maintainerDialog";
-import insurerDialog from "@/components/dialogs/list/insurerDialog";
-import guaranteeDialog from "@/components/dialogs/list/guaranteeDialog";
 import uploadFilesDialog from "@/components/dialogs/list/filesDialog";
 import uploadImgDialog from "@/components/dialogs/list/uploadImgDialog";
 import picDialog from "@/components/dialogs/list/picDialog";
@@ -127,12 +120,13 @@ import systemType from "@/components/dialogs/list/systemType";
 import myPagination from "@/components/ledger/lib/myPagination";
 import detailsDialog from "@/components/ledger/lib/detailsDia";
 import changeRea from "@/components/dialogs/changeRea";
-import { mapGetters } from "vuex";
+import {mapGetters} from "vuex";
 //图片查看
 import lookPic from "@/components/ledger/lib/lookImages";
 import Handsontable from "handsontable-pro";
 import "handsontable-pro/dist/handsontable.full.css";
 import lStorage from "@/utils/localStorage";
+import dataTypeMap from "@/utils/handsontable/dataTypeMap"
 //下拉插件
 // import "@/assets/js/chosen.jquery.min";
 // import "@/assets/js/handsontable-chosen-editor";
@@ -141,13 +135,7 @@ export default {
   props: ["myParam"],
   components: {
     qrcode, //二维码页面
-    firm, //
-    supplyDialog,
-    supplierDialog,
-    guaranteeDialog,
     uploadFilesDialog,
-    maintainerDialog,
-    insurerDialog,
     uploadImgDialog,
     picDialog,
     myPagination,
@@ -163,17 +151,16 @@ export default {
     buildFloor.getData(this.buildFloorData);
   },
   computed: {
-    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+    ...mapGetters("layout", ["projectId", "secret", "userId", "group_code"]),
     showTypes() {
       return this.onlyRead
         ? [
-          { value: "Visible", label: "只看采集信息" },
-          { value: "all", label: "全部" }
+          {value: "Visible", label: "只看采集信息"},
+          {value: "all", label: "全部"}
         ]
         : [
-          { value: "partInfo", label: "隐藏信息点" },
-          { value: "all", label: "全部" },
-          { value: "Visible", label: "只看采集信息" }
+          {value: "Visible", label: "只看采集信息"},
+          {value: "all", label: "全部"}
         ];
     },
     // batchDate() {
@@ -216,12 +203,6 @@ export default {
       myDialog: {
         qrcode: false, //二维码弹窗
         bimcode: false, //bim弹窗
-        firm: false, //厂商弹窗
-        supply: false, //选择供应合同
-        supplier: false, //供应商选择
-        guarantee: false, //选择保单
-        maintainer: false, //选择维修商
-        insurer: false, //选择保险公司
         uploadFiles: false, //上传文件
         uploadImgs: false, //上传单个图片
         pic: false, //多个图片
@@ -254,11 +235,12 @@ export default {
       showParts: false,
       inputMap: {
         flowBuild: {
-          inputMode: "D1",
           editable: true,
           code: "flowBuild",
           name: "建筑楼层",
-          path: "flowBuild"
+          path: "flowBuild",
+          category: 'STATIC',
+          dataType: "ENUM"
         }
       }, //信息点和输入方式映射表
       updateInputShow: false, //是否显示临时维护输入框
@@ -326,8 +308,8 @@ export default {
     getHeaderData(code) {
       let tempParams = this.$route.params;
       if (!tempParams.used && tempParams.pageSize) {
-        this.page.currentPage = tempParams.pageNo;
-        this.page.size = tempParams.pageSize;
+        this.page.currentPage = Number(tempParams.pageNo);
+        this.page.size = Number(tempParams.pageSize);
         this.onlyRead = tempParams.readOnly;
         tempParams.used = true;
       } else {
@@ -362,7 +344,7 @@ export default {
           this.getTableData();
           this.getAllData();
           //  信息维护
-          this.newEnclosure = res.content.filter(i => i.inputMode == "F2");
+          this.newEnclosure = res.content.filter(i => i.dataType == dataTypeMap.ATTACHMENT && i.editable == true);
         });
       }
     },
@@ -423,6 +405,9 @@ export default {
             this.initTable();
           }
         });
+      } else {
+        this.loading = false;
+        this.$message.info("请选择设备类别!");
       }
     },
     //获取所有主体数据---用于维护信息
@@ -433,13 +418,6 @@ export default {
           cascade: [
             {
               name: "property"
-              //   projection: [
-              //     "Family",
-              //     "EquipLocalName",
-              //     "EquipLocalID",
-              //     "EquipID",
-              //     "CodeType"
-              //   ]
             },
             {
               Name: "building",
@@ -484,7 +462,7 @@ export default {
     //获取动态参数
     getBatch(data) {
       let param = {
-        groupCode: "WD",
+        groupCode: this.group_code,
         appId: "datacenter",
         projectId: this.projectId,
         data: []
@@ -493,14 +471,10 @@ export default {
       //一级遍历list
       this.tableHeader.map(head => {
         //如果一级标签为动态参数或者设定参数放入数据等待请求
-        if (
-          head.inputMode == "L" ||
-          head.inputMode == "L1" ||
-          head.inputMode == "L2" ||
-          head.inputMode == "M"
-        ) {
+        if (head.category != 'STATIC') {
           data.map(item => {
             let cur = tools.dataForKey(item, head.path);
+
             if (cur) {
               param.data.push({
                 objectId: item.id,
@@ -535,11 +509,10 @@ export default {
                         item,
                         head.path,
                         child.error
-                        // child.error
-                        //   ? child.value
-                        //   ? "表号功能号格式错误"
-                        //   : "表号功能号不存在"
-                        //   : "暂未采集到实时数据"
+                          ? child.value
+                          ? "表号功能号格式错误"
+                          : "表号功能号不存在"
+                          : "暂未采集到实时数据"
                       );
                     }
                   });
@@ -754,6 +727,7 @@ export default {
         // colWidths: 200,
         autoColumnSize: true,
         language: "zh-CN",
+        fillHandle: 'vertical', //允许纵向填充
         manualColumnResize: true,
         manualColumnMove: true,
         dropdownMenu: [
@@ -798,7 +772,7 @@ export default {
         let infos = this.tableData[trimmedArr[sortArr[rowArr.row]]];
         this.getInfors(
           infos,
-          { row: sortArr[rowArr.row], col: rowArr.col },
+          {row: sortArr[rowArr.row], col: rowArr.col},
           el
         );
       } else if (isSort) {
@@ -807,14 +781,14 @@ export default {
         let infos = this.tableData[sortArr[rowArr.row]];
         this.getInfors(
           infos,
-          { row: sortArr[rowArr.row], col: rowArr.col },
+          {row: sortArr[rowArr.row], col: rowArr.col},
           el
         );
       } else if (trimmedArr.length) {
         let infos = this.tableData[trimmedArr[rowArr.row]];
         this.getInfors(
           infos,
-          { row: trimmedArr[rowArr.row], col: rowArr.col },
+          {row: trimmedArr[rowArr.row], col: rowArr.col},
           el
         );
       } else {
@@ -858,7 +832,7 @@ export default {
       let param = [];
       params.map(item => {
         this.deleteCode = item.classCode;
-        param.push({ id: item.id });
+        param.push({id: item.id});
       });
       this.$confirm("此操作将删除设备,是否继续?", "提示", {
         confirmButtonText: "确定",
@@ -877,16 +851,17 @@ export default {
     async removeDevice(param) {
       await deleteEquip(param, res => {
         this.$message.success("删除成功");
-        this.$emit("close", { code: this.deleteCode });
+        this.$emit("close", {code: this.deleteCode});
         // this.getTableData()
       });
     },
     // 更新
     updateBusiness(data, change) {
       let param = {
-        content: [],
-        projection: []
-      },
+          content: [],
+          projection: [],
+          nullItems: []
+        },
         keyList = [];
       //生成要修改字段列表
       change.map(item => {
@@ -905,6 +880,11 @@ export default {
           item[1] != "propertyId"
         ) {
           param.projection.push(key);
+          keyList.push(item[1])
+        }
+        // 保存置空字段
+        if (item[1] && item[3] == "" && param.nullItems.indexOf(item[1]) == -1) {
+          param.nullItems.push(item[1])
         }
       });
       //生成对应修改数据
@@ -980,12 +960,14 @@ export default {
     forValue(arr, val) {
       let enclosure = [];
       arr &&
-        arr.length &&
-        arr.map(i => {
-          if (i.path == val) {
-            enclosure = i.value;
-          }
-        });
+      arr.length &&
+      arr.map(i => {
+        if (i.path == val) {
+          enclosure = i.value;
+        } else {
+          enclosure = []
+        }
+      });
       return enclosure;
     },
     multiples(val) {
@@ -993,123 +975,99 @@ export default {
       switch (val) {
         case "infos.insuranceFile": //保险文件
           this.filesArr = this.forValue(this.newEnclosure, val)
-            ? this.forValue(this.newEnclosure, val)
-            : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
         case "infos.archive": //设备文档
           this.filesArr = this.forValue(this.newEnclosure, val)
-            ? this.forValue(this.newEnclosure, val)
-            : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
         case "infos.checkReport": //安装质检报告
           this.filesArr = this.forValue(this.newEnclosure, val)
-            ? this.forValue(this.newEnclosure, val)
-            : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
         case "infos.maintainManual": //维修保养手册
           this.filesArr = this.forValue(this.newEnclosure, val)
-            ? this.forValue(this.newEnclosure, val)
-            : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
         case "infos.approachingAcceptance": //进场验收单
           this.filesArr = this.forValue(this.newEnclosure, val)
-            ? this.forValue(this.newEnclosure, val)
-            : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
         case "infos.acceptanceReport": //验收报告
           this.filesArr = this.forValue(this.newEnclosure, val)
-            ? this.forValue(this.newEnclosure, val)
-            : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
         case "infos.operationManual": //操作说明书
           this.filesArr = this.forValue(this.newEnclosure, val)
-            ? this.forValue(this.newEnclosure, val)
-            : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
         case "infos.originalCertificate": //原厂证明
           this.filesArr = this.forValue(this.newEnclosure, val)
-            ? this.forValue(this.newEnclosure, val)
-            : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
         case "infos.testReport": //检测报告
           this.filesArr = this.forValue(this.newEnclosure, val)
-            ? this.forValue(this.newEnclosure, val)
-            : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
         case "infos.productCertification": //产品合格证
           this.filesArr = this.forValue(this.newEnclosure, val)
-            ? this.forValue(this.newEnclosure, val)
-            : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
         case "infos.installInstruction": //安装说明书
           this.filesArr = this.forValue(this.newEnclosure, val)
-            ? this.forValue(this.newEnclosure, val)
-            : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
         case "infos.drawing": //设备图纸
           this.filesArr = this.forValue(this.newEnclosure, val)
-            ? this.forValue(this.newEnclosure, val)
-            : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
         case "infos.installDrawing": //安装图纸
           this.filesArr = this.forValue(this.newEnclosure, val)
-            ? this.forValue(this.newEnclosure, val)
-            : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
         case "infos.supplierContract": //供应合同
           this.filesArr = this.forValue(this.newEnclosure, val)
-            ? this.forValue(this.newEnclosure, val)
-            : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
         case "infos.installPic"://安装照片
           this.imgsArr = this.forValue(this.newEnclosure, val)
-            ? this.forValue(this.newEnclosure, val)
-            : [];
           this.infoType = val;
           this.myDialog.uploadImgs = true;
           break;
         case "infos.nameplate"://设备铭牌照片
           this.imgsArr = this.forValue(this.newEnclosure, val)
-            ? this.forValue(this.newEnclosure, val)
-            : [];
           this.infoType = val;
           this.myDialog.uploadImgs = true;
           break;
         case "infos.pic"://设备照片
           this.picsArr = this.forValue(this.newEnclosure, val)
-            ? this.forValue(this.newEnclosure, val)
-            : [];
           this.infoType = val;
           this.myDialog.pic = true;
           break;
+        case "infos.designIDGraph": //设计工况空调机组处理过程焓湿图(F2)
+          this.filesArr = this.forValue(this.newEnclosure, val)
+          this.infoType = val;
+          this.myDialog.uploadFiles = true;
+          break;
+        case "infos.fanCharacterCurve": //风机性能曲线(F1)
+          this.filesArr = this.forValue(this.newEnclosure, val)
+          this.infoType = val;
+          this.myDialog.uploadFiles = true;
+          break;
       }
     },
     getInfors(infos, row, el) {
@@ -1117,12 +1075,12 @@ export default {
       let inputData = this.inputMap[val];
       this.row = row.row;
       this.messKey = val;
+      this.curDevice = infos.id;
       this.firmDataType = "row";
       lStorage.set("screen_data", {
         path: this.$route.path,
-        data: { equip: infos }
+        data: {equip: infos}
       });
-      console.log(val, '=================================')
       switch (val) {
         //操作
         case "caozuo":
@@ -1173,7 +1131,6 @@ export default {
           return false;
         //关联系统()
         case "linkSystem":
-          this.curDevice = infos.EquipID;
           this.systemList = this.tableData[row.row].linkSystem || [];
           this.myDialog.systemType = true;
           return false;
@@ -1183,62 +1140,30 @@ export default {
             this.myDialog.changeRea = true;
           }
           return false;
-        //品牌型号弹窗
-        case "dpManufacturerId":
-          if (!this.onlyRead) {
-            this.myDialog.firm = true;
-          }
-          return false;
-        //供应商信息弹窗
-        case "dpSupplierId":
-          if (!this.onlyRead) {
-            this.myDialog.supplier = true;
-          }
-          return false;
-        //维修商信息弹窗
-        case "dpMaintainerId":
-          if (!this.onlyRead) {
-            this.myDialog.maintainer = true;
-          }
-          return false;
-        //保险公司信息
-        case "dpInsurerId":
-          if (!this.onlyRead) {
-            this.myDialog.insurer = true;
-          }
-          return false;
-        //供应合同编号(B1)
-        case "infos.supplierContractID":
-          if (!this.onlyRead) {
-            let ContractIDflag = null;
-            let DPSdata = this.tableData[row.row].dpSupplierId;
-            if (DPSdata) {
-              ContractIDflag = DPSdata.split("-")[0];
-            }
-            if (!!ContractIDflag) {
-              this.id = ContractIDflag;
-              this.myDialog.supply = true;
-            } else {
-              this.$message("请先选择供应商");
-            }
-          }
-          return false;
-        //保险单号(B1)
-        case "infos.insuranceNum":
-          if (!this.onlyRead) {
-            let DPInsurerIDflag = null;
-            let DPIdata = this.tableData[row.row].dpInsurerId;
-            if (DPIdata) {
-              DPInsurerIDflag = DPIdata.split("-")[0];
-            }
-            if (!!DPInsurerIDflag) {
-              this.id = DPInsurerIDflag;
-              this.myDialog.guarantee = true;
-            } else {
-              this.$message("请先选择保险商");
-            }
-          }
-          return false;
+        /**
+         * 关联资产后才可维护的信息点
+         */
+        // case 'flowBuild': //所属建筑楼层
+        // case 'infos.productDate': //生产日期
+        // case 'infos.serialNum': //出厂编号
+        // case 'infos.assetID': //资产编号
+        // case 'infos.purchasePrice': //采购价格
+        // case 'infos.insuranceNum': //保险单号
+        // case 'infos.insuranceFile': //保险文件
+        //     if (!this.onlyRead) {
+        //         const linkId = this.tableData[row.row].linkId;
+        //         if (!linkId) { //未关联资产
+        //             this.$confirm('您暂未关联设备对应的资产,该信息点不可编辑', '提示', {
+        //                 confirmButtonText: '我知道了',
+        //                 showCancelButton: false,
+        //                 type: 'warning',
+        //                 center: true
+        //             }).then(() => {
+        //                 return false;
+        //             });
+        //         }
+        //     }
+        //     return false;
         //保险文件--设备文档--安装质检报告
         case "infos.insuranceFile": //保险文件(F2)
         case "infos.archive": //设备文档(F2)
@@ -1254,6 +1179,8 @@ export default {
         case "infos.supplierContract": //供应合同(F2)
         case "infos.drawing": //设备图纸(F2)
         case "infos.installDrawing": //安装图纸(F2)
+        case "infos.designIDGraph": //设计工况空调机组处理过程焓湿图(F2)
+        case "infos.fanCharacterCurve": //风机性能曲线(F1)
           let IPSdata = tools.dataForKey(this.tableData[row.row], val);
           this.filesArr = IPSdata ? IPSdata : [];
           if (!this.onlyRead || this.filesArr.length) {
@@ -1278,12 +1205,12 @@ export default {
           }
           return false;
         //包含的部件字段
-        case "Count":
+        case "count":
           let countUrl = this.onlyRead ? "/ledger/parts" : "/ledger/partsmanage";
           this.$router.push({
             path: countUrl,
             query: {
-              deviceId: infos.EquipID,
+              deviceId: infos.id,
               typeId: this.mess.deviceId,
               pageNo: this.page.currentPage,
               pageSize: this.page.size
@@ -1293,15 +1220,19 @@ export default {
         default:
           break;
       }
-      console.log(inputData);
-      console.log('====================');
       if (!this.onlyRead && !inputData.editable) {
-        this.$message("该信息点的值为自动生成,不可人工维护!");
-        return false;
+        this.$confirm('该信息点的值为自动生成,不可人工维护!', '提示', {
+            confirmButtonText: '我知道了',
+            showCancelButton: false,
+            type: 'warning',
+            center: true
+        }).then(() => {
+            return false;
+        });
       }
       if (
         !this.onlyRead &&
-        showTools.inputModeArr.indexOf(inputData.inputMode) == "-1"
+        showTools.inputModeArr.indexOf(inputData.dataType) == "-1"
       ) {
         this.updateInfoPoint = val;
         this.updateInput = tools.dataForKey(this.tableData[row.row], val);
@@ -1357,190 +1288,6 @@ export default {
       }
       return a;
     },
-    //如果选择供应商之后
-    supplierChange(data, type) {
-      if (type === "dialog") {
-        let firm = { ...data, num: 8 };
-        this.firmName = firm;
-      } else {
-        tools.setDataForKey(
-          this.tableData[this.row],
-          "dpSupplierId",
-          data.venderId
-        );
-        tools.setDataForKey(
-          this.tableData[this.row],
-          "infos.supplier",
-          data.name
-        );
-        this.handleUpdataTable(
-          [
-            [this.row, "dpSupplierId", null, data.venderId],
-            [this.row, "infos.supplier", null, data.name]
-          ],
-          "edit"
-        );
-        // this.handleUpdataTable([[this.row, "infos.SupplyPurchase.Supplier", null, data.name]], "edit")
-      }
-    },
-    //供应合同编号
-    supplyChange(data) {
-      tools.setDataForKey(
-        this.tableData[this.row],
-        "infos.supplierContractID",
-        { id: data }
-      );
-    },
-    //保险单号-保险文件
-    guaranteeChange(data) {
-      for (let key in data) {
-        this.utilToKey(key, "insuranceNo", data, "InsuranceNum");
-        if (key == "contractFile") {
-          if (!!data[key]) {
-            data[key] = [data[key]];
-          }
-        }
-        this.utilToKey(key, "contractFile", data, "InsuranceFile");
-      }
-    },
-    //选择型号修改
-    firmChange(data, type) {
-      if (type === "dialog") {
-        // 如果是批量信息维护
-        let venderName = data.venderName ? data.venderName : "空";
-        let brandName = data.brandName ? data.brandName : "空";
-        let name = data.name ? data.name : "空";
-        let firm = {
-          ...data,
-          num: 2,
-          Specification: data.name,
-          name: `${venderName}/${brandName}/${name}`
-        };
-        this.firmName = firm; //批量维护dialog显示对象的字段
-      } else {
-        //如果是表格操作
-        tools.setDataForKey(
-          this.tableData[this.row],
-          "dpManufacturerId",
-          data.venderId
-        ); //生产商ID
-        tools.setDataForKey(
-          this.tableData[this.row],
-          "dpBrandId",
-          data.brandId
-        ); //品牌ID
-        tools.setDataForKey(
-          this.tableData[this.row],
-          "dpSpecificationId",
-          data.specificationId
-        ); //型号ID
-        tools.setDataForKey(
-          this.tableData[this.row],
-          "testReport",
-          data.venderName
-        );
-        tools.setDataForKey(
-          this.tableData[this.row],
-          "infos.manufacturer",
-          data.venderName
-        );
-        tools.setDataForKey(
-          this.tableData[this.row],
-          "infos.brand",
-          data.name
-        );
-        tools.setDataForKey(
-          this.tableData[this.row],
-          "infos.specification",
-          data.brandName
-        );
-        this.handleUpdataTable(
-          [
-            [this.row, "dpManufacturerId", null, data.venderId],
-            [this.row, "dpBrandId", null, data.brandId],
-            [this.row, "dpSpecificationId", null, data.specificationId],
-            [
-              this.row,
-              "infos.manufacturer",
-              null,
-              data.venderName
-            ],
-            [
-              this.row,
-              "infos.brand",
-              null,
-              data.brandName
-            ],
-            [
-              this.row,
-              "infos.specification",
-              null,
-              data.name
-            ]
-          ],
-          "edit"
-        );
-        // this.handleUpdataTable([[this.row, "infos.equipManufactor.Brand", null, data.brand]], "edit")
-        // this.handleUpdataTable([[this.row, "infos.equipManufactor.Specification", null, data.name]], "edit")
-      }
-    },
-    //保险商变更
-    changeInsurer(data, type) {
-      if (type === "dialog") {
-        let firm = { ...data, num: 42 };
-        this.firmName = firm;
-      } else {
-        tools.setDataForKey(
-          this.tableData[this.row],
-          "dpInsurerId",
-          data.venderId
-        );
-        tools.setDataForKey(
-          this.tableData[this.row],
-          "infos.insurer",
-          data.name
-        );
-        this.handleUpdataTable(
-          [
-            [this.row, "dpInsurerId", null, data.venderId],
-            [this.row, "infos.insurer", null, data.name]
-          ],
-          "edit"
-        );
-        // this.handleUpdataTable([[this.row, "infos.InsuranceDoc.Insurer", null, data.name]], "edit")
-      }
-    },
-    //维修商变更
-    changeMaintainer(data, type) {
-      if (type === "dialog") {
-        let firm = { ...data, num: 35 };
-        this.firmName = firm;
-      } else {
-        tools.setDataForKey(
-          this.tableData[this.row],
-          "dpMaintainerId",
-          data.venderId
-        );
-        tools.setDataForKey(
-          this.tableData[this.row],
-          "infos.maintainer",
-          data.name
-        );
-        this.handleUpdataTable(
-          [
-            [this.row, "dpMaintainerId", null, data.venderId],
-            [
-              this.row,
-              "infos.maintainer",
-              null,
-              data.name
-            ]
-          ],
-          "edit"
-        );
-        // this.handleUpdataTable([[this.row, "infos.operationMainte.maintainer", null, data.name]], "edit")
-      }
-    },
     //修改关联的资产
     changeProperty(val) {
       this.setDataToMain(val.propertyId, "propertyId", this.row);
@@ -1553,7 +1300,6 @@ export default {
     //上传文件弹窗触发事件
     fileChange(keys, type, file) {
       if (type === "dialog") {
-        // this.information = keys
         this.newEnclosure.forEach(i => {
           if (i.path == keys) {
             this.$set(i, "value", file);
@@ -1567,7 +1313,6 @@ export default {
     //上传图片弹窗触发事件
     imgChange(keys, type, file) {
       if (type === "dialog") {
-        // this.information = keys
         this.newEnclosure.forEach(i => {
           if (i.path == keys) {
             this.$set(i, "value", file);
@@ -1629,69 +1374,11 @@ export default {
         params: query
       })
     },
-    upDataDevice(type, data1, data2) {
-      let param = { content: data1 };
-      let param1 = { content: data2 };
-      if (type === 1) {
-        //增量
-        //LedgerParam
-        let filterParam = this.filterCheck(param, "sole");
-        let filterParam1 = this.filterCheck(param1, "multiple");
-        if (filterParam) {
-          updateEquip(param, res => {
-          });
-        }
-        if (filterParam1) {
-          param1.content.map(i => {
-            i.equipId = i.id
-            delete i.id
-            return i
-          })
-          setTimeout(() => {
-            queryUpdate(param1, res => {
-            });
-          });
-        }
-      }
-      if (type === 2) {
-        //覆盖
-        let filterParams = this.filterCheck(param, "sole");
-        if (filterParams) {
-          updateEquip(param, res => {
-          });
-        }
-      }
-
+    upDataDevice() {
       setTimeout(() => {
         this.getTableData();
         this.getAllData();
       }, 1000);
-    },
-    filterCheck(arr, type) {
-      if (type === "sole") {
-        for (let i of arr.content) {
-          for (let j in i.infos) {
-            if (Array.isArray(i.infos[j]) && i.infos[j].length < 1) {
-              delete i.infos[j]
-            }
-          }
-          return Object.keys(i.infos).length;
-        }
-      } else if (type === "multiple") {
-        let nArr = [];
-        arr.content.forEach(i => {
-          let { id, ...value } = i;
-          nArr.push({ infos: value });
-        });
-        // nArr.map(i => {
-        //   if (Array.isArray(i) && i.length < 1) {
-        //     console.log(i)
-        //   }
-        // })
-        for (let j of nArr) {
-          return Object.keys(j.infos).length;
-        }
-      }
     }
   },
   watch: {
@@ -1707,7 +1394,7 @@ export default {
         if (newName && newName[0] && newName[0].value) {
           this.showType = newName[0].value;
         } else {
-          this.showType = "";
+          this.showType = "Visible";
         }
       },
       immediate: true,

+ 67 - 88
src/components/ledger/handsontables/system.vue

@@ -13,12 +13,12 @@
       </el-select>
       <el-button size="small" style="width: 80px" @click="addDevice" icon="iconfont icon-tianjia">添加系统</el-button>
       <el-button size="small" style="width: 80px" @click="reset" icon="iconfont icon-shuaxin">刷新</el-button>
-      <el-button size="small" style="width: 80px" @click="undo" icon="iconfont icon-undo">撤销</el-button>
+      <el-button v-show="!onlyRead" size="small" style="width: 80px" @click="undo" icon="iconfont icon-undo">撤销</el-button>
     </div>
     <qrcode :dialog="myDialog" :addBody="true" ref="qrcode"></qrcode>
-    <upload-files-dialog ref="upload" @changeFile="fileChange" :keysArr="filesArr"
+    <upload-files-dialog ref="upload" @changeFile="fileChange" :keysArr="filesArr" firmDataType="row"
                          :dialog="myDialog"></upload-files-dialog>
-    <upload-img-dialog @changeFile="imgChange" :keysArr="imgsArr" :dialog="myDialog"></upload-img-dialog>
+    <upload-img-dialog :read="onlyRead ? true : false" @changeFile="imgChange" :keysArr="imgsArr" firmDataType="row" :dialog="myDialog"></upload-img-dialog>
     <pic-dialog :dialog="myDialog" :keysArr="picsArr" @change="changePics"></pic-dialog>
     <div class="center middle_sty" style="height: 91%" v-show="!mess.deviceId && (!tableData || !tableData.length)">
       <p><i class="icon-wushuju iconfont"></i>请选择系统类型</p>
@@ -64,21 +64,16 @@
   </div>
 </template>
 <script>
-import {
-  BeatchQueryParam,
-  querySysLinkBuild,
-  updateGeneralSys,
-  deleteGeneralSys
-} from "@/api/scan/request"
-import { getDataDictionary } from "@/api/dict";
+import {BeatchQueryParam, deleteGeneralSys, querySysLinkBuild, updateGeneralSys} from "@/api/scan/request"
+import {getDataDictionary} from "@/api/dict";
 
 import myCascader from "@/components/ledger/lib/system";
 import tools from "@/utils/scan/tools";
 import handsonUtils from "@/utils/scan/hasontableUtils"
 import showTools from "@/utils/handsontable/notShow"
 import qrcode from "@/components/business_space/lib/qrcode"
-import uploadFilesDialog from "@/components/business_space/dialogs/list/filesDialog"
-import uploadImgDialog from "@/components/business_space/dialogs/list/uploadImgDialog"
+import uploadFilesDialog from "@/components/dialogs/list/filesDialog"
+import uploadImgDialog from "@/components/dialogs/list/uploadImgDialog"
 import picDialog from "@/components/business_space/dialogs/list/picDialog"
 import myPagination from "@/components/common/myPagination"
 import detailsDialog from "@/components/business_space/lib/detailsDia"
@@ -88,7 +83,7 @@ import text from "@/utils/handsontable/mainText"
 import 'handsontable-pro/dist/handsontable.full.css'
 import editSysfloor from "@/components/ledger/lib/editSysFloor";
 
-import { mapGetters } from "vuex";
+import {mapGetters} from "vuex";
 
 export default {
   components: {
@@ -103,11 +98,11 @@ export default {
     editSysfloor
   },
   computed: {
-    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+    ...mapGetters("layout", ["projectId", "secret", "userId", "group_code"]),
     showTypes() {
       return this.onlyRead ?
-        [{ value: "Visible", label: '只看采集信息' }, { value: "all", label: '全部' }] :
-        [{ value: "Visible", label: '只看采集信息' }, { value: "all", label: '全部' }]
+        [{value: "Visible", label: '只看采集信息'}, {value: "all", label: '全部'}] :
+        [{value: "Visible", label: '只看采集信息'}, {value: "all", label: '全部'}]
     }
   },
   data() {
@@ -130,12 +125,6 @@ export default {
       },
       myDialog: {
         qrcode: false, //二维码弹窗
-        firm: false, //厂商弹窗
-        supply: false, //选择供应合同
-        supplier: false, //供应商选择
-        guarantee: false, //选择保单
-        maintainer: false, //选择维修商
-        insurer: false, //选择保险公司
         uploadFiles: false,//上传文件
         uploadImgs: false,//上传单个图片
         pic: false, //多个图片
@@ -161,11 +150,12 @@ export default {
       addData: {}, //添加设备选择的设备类型
       inputMap: {
         flowBuild: {
-          inputMode: 'D1',
           editable: true,
           code: "flowBuild",
           name: "建筑楼层",
-          path: "flowBuild"
+          path: "flowBuild",
+          category: 'STATIC',
+          dataType: "ENUM"
         }
       }, //信息点和输入方式映射表
       updateInputShow: false, //是否显示临时维护输入框
@@ -184,7 +174,8 @@ export default {
     },
     //获取表头
     getHeaderData(code) {
-      this.mess = code
+      this.mess = code;
+
       if (this.mess.deviceId) {
         let params = {
           type: this.mess.deviceId,
@@ -255,7 +246,9 @@ export default {
     },
     //撤回
     undo() {
-      this.hot.undo();
+      if (this.tableData.length) {
+				this.hot.undo();
+			}
     },
     //刷新
     reset() {
@@ -279,7 +272,7 @@ export default {
     },
     //下一步
     toAddDevice() {
-      if (this.addData.Category) {
+      if (this.addData.category) {
         this.$router.push({
           path: "/ledger/systemadd",
           query: this.addData
@@ -288,10 +281,10 @@ export default {
     },
     //选择设备类型-添加设备
     changeAddType(val) {
-      console.log(val, '=====================')
-      this.addData.Category = val.classCode;
-      this.addData.CategoryName = val.name;
+      this.addData.category = val.classCode;
+      this.addData.categoryName = val.categoryName;
       this.addData.showType = this.showType;
+      console.log('val',val,this.addData)
     },
     //格式化表头
     formatHeaderData(list) {
@@ -336,7 +329,7 @@ export default {
     //获取动态参数
     getBatch(data) {
       let param = {
-        groupCode: "WD",
+        groupCode: this.group_code,
         appId: "datacenter",
         projectId: this.projectId,
         data: []
@@ -344,12 +337,7 @@ export default {
       //一级遍历list
       this.tableHeader.map(head => {
         //如果一级标签为动态参数或者设定参数放入数据等待请求
-        if (
-          head.inputMode == "L" ||
-          head.inputMode == "L1" ||
-          head.inputMode == "L2" ||
-          head.inputMode == "M"
-        ) {
+        if (head.category != 'STATIC') {
           data.map(item => {
             let cur = tools.dataForKey(item, head.path);
             if (cur) {
@@ -385,8 +373,7 @@ export default {
                       tools.setDataForKey(
                         item,
                         head.path,
-                        child.error
-                        // child.error ? child.value ? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
+                        child.error ? child.value ? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
                       );
                     }
                   });
@@ -422,6 +409,7 @@ export default {
         // colWidths: 200,
         autoColumnSize: true,
         language: "zh-CN",
+        fillHandle: 'vertical', //允许纵向填充
         manualColumnResize: true,
         manualColumnMove: true,
         dropdownMenu: [
@@ -525,8 +513,9 @@ export default {
     // 修改
     updateBusiness(data, change) {
       let param = {
-        Content: [],
-        Projection: []
+        content: [],
+        projection: [],
+        nullItems: []
       }, keyList = [];
       //生成要修改字段列表
       change.map(item => {
@@ -534,8 +523,13 @@ export default {
         if (item[1] && keyList.indexOf(key) == -1) {
           keyList.push(key);
         }
-        if (item[1] && item[3] == "" && param.Projection.indexOf(key) == -1) {
-          param.Projection.push(key);
+        if (item[1] && item[3] == "" && param.projection.indexOf(key) == -1) {
+          param.projection.push(key);
+          keyList.push(item[1])
+        }
+        // 保存置空字段
+        if (item[1] && item[3] == "" && param.nullItems.indexOf(item[1]) == -1) {
+          param.nullItems.push(item[1])
         }
       });
       //生成对应修改数据
@@ -544,7 +538,7 @@ export default {
           let itemData = tools.dataForKey(item, value);
           tools.setDataForKey(item, value, itemData == "" ? null : itemData);
         });
-        param.Content.push(item);
+        param.content.push(item);
       });
       updateGeneralSys(param, res => {
       });
@@ -554,7 +548,7 @@ export default {
       //其他的开始判断
       let val = this.hot.colToProp(row.col);
       let inputData = this.inputMap[val];
-      this.systemId = infos.SysID
+      this.systemId = infos.SysID;
       this.row = row.row
       this.messKey = val
       switch (val) {
@@ -589,14 +583,28 @@ export default {
             this.$refs.editFloor.showDialog(this.tableData[row.row]);
           }
           return false
+				//系统图(F2)
+        case "infos.systemChart":
+          let SSPPdata = tools.dataForKey(this.tableData[row.row], val);
+          this.imgsArr = SSPPdata ? SSPPdata : [];
+          if (!this.onlyRead || this.imgsArr.length) {
+            this.myDialog.uploadImgs = true;
+          }
+          return false;
         default:
           break;
       }
       if (!this.onlyRead && !inputData.editable) {
-        this.$message("该信息点的值为自动生成,不可人工维护!");
-        return false;
+        this.$confirm('该信息点的值为自动生成,不可人工维护!', '提示', {
+            confirmButtonText: '我知道了',
+            showCancelButton: false,
+            type: 'warning',
+            center: true
+        }).then(() => {
+            return false;
+        });
       }
-      if (!this.onlyRead && showTools.inputModeArr.indexOf(inputData.inputMode) == '-1') {
+      if (!this.onlyRead && showTools.inputModeArr.indexOf(inputData.dataType) == '-1') {
         this.updateInfoPoint = val;
         this.updateInput = tools.dataForKey(this.tableData[row.row], val);
         this.myDialog.update = true;
@@ -647,57 +655,28 @@ export default {
     },
     //上传文件弹窗触发事件
     fileChange(keys) {
-      this.setDataToMain(keys[0], this.messKey.split(".")[1], this.row)
-      //   tools.setItem(this.deviceType.code, this.tableData)
+			this.setDataToMain(keys, this.messKey, this.row);
     },
     //上传图片弹窗触发事件
     imgChange(keys) {
-      this.setDataToMain(keys[0], this.messKey.split(".")[1], this.row)
-      //   tools.setItem(this.deviceType.code, this.tableData)
+			this.setDataToMain(keys, this.messKey, this.row);
     },
     //设备图片弹窗改变事件
     changePics(keys) {
-      this.setDataToMain(keys, this.messKey.split(".")[1], this.row)
-      //   tools.setItem(this.deviceType.code, this.tableData)
+			this.setDataToMain(keys, this.messKey, this.row);
     },
     //判断是否有值,有值赋值
     setDataToMain(data, key, row) {
-      if (!!data && data != '--') {
-        if (!!this.tableData[row].infos) {
-          //falg确定每个的是否有值
-          let falg = false
-          if (!this.tableData[row].infos[key]) {
-            falg = true
-          }
-          //铭牌照片特殊处理
-          if (key == 'Nameplate') {
-            this.tableData[row].infos[key] = {
-              "systemId": "dataPlatform",
-              "name": "铭牌照片",
-              "type": "image",
-              "key": data
-            }
-          } else {
-            this.tableData[row].infos[key] = data
-          }
-          if (falg) {
-            this.updateBusiness([this.tableData[row]], [[0, "infos." + key, null, data]])
-          }
+			if (!!data && data != "--") {
+        if (!!this.tableData[row]) {
+          tools.setDataForKey(this.tableData[row], key, data);
+          this.handleUpdataTable([[row, key, null, data]], "edit");
         } else {
-          this.tableData[row].infos = {}
-          if (key == 'Nameplate') {
-            this.tableData[row].infos[key] = {
-              "systemId": "dataPlatform",
-              "name": "铭牌照片",
-              "type": "image",
-              "key": data
-            }
-          } else {
-            this.tableData[row].infos[key] = data
-          }
+          this.tableData[row] = {};
+          tools.setDataForKey(this.tableData[row], key, data);
         }
       } else {
-        this.tableData[row].infos[key] = ''
+        tools.setDataForKey(this.tableData[row], key, "");
       }
     }
   },
@@ -712,7 +691,7 @@ export default {
         if (newName && newName[0] && newName[0].value) {
           this.showType = newName[0].value
         } else {
-          this.showType = ""
+          this.showType = "Visible"
         }
       },
       immediate: true,

+ 0 - 510
src/components/ledger/lib/addDevice.vue

@@ -1,510 +0,0 @@
-<template>
-  <div>
-    <div class="hanson-bar">
-      <span>当前选择的设备类型:{{deviceType.facility}}</span>
-      <el-button size="small" @click="undo" icon="iconfont icon-undo">撤销</el-button>
-      <el-button size="small" @click="reset" icon="iconfont icon-shuaxin">刷新</el-button>
-    </div>
-    <qrcode :dialog="dialog" :addBody="true" ref="qrcode"></qrcode>
-    <firm :dialog="dialog"></firm>
-    <supply-dialog :dialog="dialog"></supply-dialog>
-    <supplier-dialog :dialog="dialog"></supplier-dialog>
-    <guarantee-dialog :dialog="dialog"></guarantee-dialog>
-    <upload-files-dialog :dialog="dialog"></upload-files-dialog>
-    <div v-show="main && main.length" id="myHandson" ref="myHandson"></div>
-  </div>
-</template>
-<script>
-import { getSpaceHeader } from "@/api/scan/request";
-import tools from "@/utils/scan/tools";
-import qrcode from "@/components/business_space/lib/qrcode";
-import firm from "@/components/business_space/dialogs/list/firm";
-import supplyDialog from "@/components/business_space/dialogs/list/supplyDialog";
-import supplierDialog from "@/components/business_space/dialogs/list/supplierDialog";
-import guaranteeDialog from "@/components/business_space/dialogs/list/guaranteeDialog";
-import uploadFilesDialog from "@/components/business_space/dialogs/list/filesDialog";
-import Handsontable from "handsontable-pro"
-import 'handsontable-pro/dist/handsontable.full.css'
-import zhCN from 'handsontable-pro/languages/zh-CN';
-import {
-    mapGetters,
-    mapActions
-} from "vuex";
-export default {
-  props: {
-    deviceType: {
-      type: Object
-    }
-  },
-  components: {
-    qrcode, //二维码页面
-    firm, //
-    supplyDialog,
-    supplierDialog,
-    guaranteeDialog,
-    uploadFilesDialog,
-  },
-  computed: {
-        ...mapGetters("layout", [
-            "projectId",
-            "secret",
-            "userId"
-        ])
-    },
-  data() {
-    let table = function (num) {
-      let main = []
-      for (let i = 0; i < num; i++) {
-        main.push({})
-      }
-      return main
-    }
-    return {
-      main: table(20),
-      mess: {},
-      headers: null,
-      page: {
-        size: 50,
-        sizes: [10, 30, 50, 100, 150, 200],
-        total: 400,
-        currentPage: 1
-      },
-      dialog: {
-        qrcode: false, //二维码弹窗
-        firm: false, //厂商弹窗
-        supply: false, //选择供应合同
-        supplier: false, //供应商选择
-        guarantee: false //选择保单
-      }
-    };
-  },
-  created() {
-  },
-  mounted() { },
-  methods: {
-
-    //获取header的mess
-    getHeader(mess) {
-      this.mess = mess;
-      console.log(this.mess);
-    },
-
-    //获取主体内容
-    getMain(floorMess) {
-      console.log(floorMess);
-    },
-
-    //获取表头
-    getData() {
-      getSpaceHeader({
-        code: this.deviceType.code,
-        ProjId: this.projectId
-      }).then(res => {
-        this.headers = res.data.Content;
-        if (!!this.hot) {
-          this.hot.destroy();
-          this.hot = null;
-        }
-        this.initHot();
-      });
-    },
-
-    //撤回
-    undo() {
-      this.hot.undo();
-    },
-
-    //刷新
-    reset() {
-      this.getData();
-    },
-
-    //添加设备
-    addDevice() {
-      console.log("addDevice")
-    },
-
-    /**
-     * 表头文案处理函数
-     * @param arr header数组数据
-     *
-     * @return 处理好的文案
-     */
-    delHeader(arr) {
-      let data = arr.map(item => {
-        if (
-          item.InputMode == "A1" ||
-          item.InputMode == "A2" ||
-          item.InputMode == "B1" ||
-          item.InputMode == "C5" ||
-          item.InputMode == "D1" ||
-          item.InputMode == "D2" ||
-          item.InputMode == "X" ||
-          item.InputMode == "L" ||
-          item.InputMode == "L1" ||
-          item.InputMode == "L2" ||
-          item.InputMode == "F1" ||
-          item.InputMode == "F2"
-        ) {
-          if (item.unit == "") {
-            return item.InfoPointName;
-          } else {
-            return item.InfoPointName + "(" + item.unit + ")";
-          }
-        } else {
-          return undefined;
-        }
-      });
-      data = data.filter(item => item);
-      data.unshift("同时创建资产", "所属建筑楼层", "所属系统实例");
-      return data;
-    },
-
-    /**
-     * 表头数据处理函数
-     * @param arr header数组数据
-     *
-     * @return 处理好的数据格式
-     */
-    getType(arr) {
-      let data = arr.map(item => {
-        //二维码
-        if (item.infoPointCode == "EquipQRCode") {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-        //厂商选择
-        if (item.infoPointCode == "Brand" || item.infoPointCode == "Specification") {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-        if (item.infoPointCode == "SupplierContractID") {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-
-        if (item.infoPointCode == "InsuranceNum") {
-          //选择保单
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-
-        if (item.infoPointCode == "InsuranceFile" || item.infoPointCode == "Archive") {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-
-        if (
-          item.infoPointCode == "InstallLocation" ||
-          item.infoPointCode == "InstallPic" ||
-          item.infoPointCode == "InstallDrawing" ||
-          item.infoPointCode == "Nameplate" ||
-          item.infoPointCode == "Pic" ||
-          item.infoPointCode == "Drawing"
-        ) {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-
-        if (
-          item.infoPointCode == "maintainer" ||
-          item.infoPointCode == "Supplier" ||
-          item.infoPointCode == "Insurer" ||
-          item.infoPointCode == "InsurerContactor"
-        ) {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-        if (item.InputMode == "D1") {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.customDropdownRenderer,
-            editor: "chosen",
-            chosenOptions: {
-              // multiple: true,//多选
-              data: item.DataSource.Content || ""
-            }
-          };
-        } else if (item.InputMode == "A1" || item.InputMode == "A2") {
-          return {
-            data: "infos." + item.infoPointCode,
-            type: "numeric",
-            numericFormat: {
-              pattern: "0,0.00"
-              // culture: 'de-DE' // use this for EUR (German),
-              // more cultures available on http://numbrojs.com/languages.html
-            }
-          };
-        } else if (item.InputMode == "C5") {
-          return {
-            data: "infos." + item.infoPointCode,
-            type: "date",
-            dateFormat: "YYYY-MM-DD",
-            correctFormat: true
-          };
-        } else if (
-          item.InputMode == "B1" ||
-          item.InputMode == "L" ||
-          item.InputMode == "L1" ||
-          item.InputMode == "L2"
-        ) {
-          return {
-            data: "infos." + item.infoPointCode
-          };
-        } else if (
-          item.InputMode == "X" ||
-          item.InputMode == "F2"
-          // item.InputMode == "L1" ||
-          // item.InputMode == "L2"
-        ) {
-          return {
-            data: "infos." + item.infoPointCode,
-            readOnly: true
-          };
-        } else if (item.InputMode == "D2") {
-          return {
-            data: "infos." + item.infoPointCode,
-            renderer: tools.customDropdownRenderer,
-            editor: "chosen",
-            chosenOptions: {
-              multiple: true, //多选
-              data: item.DataSource.Content || ""
-            }
-          };
-        } else {
-          return undefined;
-        }
-
-      });
-      data.unshift(
-        {
-          type: "checkbox",
-          checkedTemplate: 1,
-          uncheckedTemplate: 0,
-          data: "Checked",
-          label: {
-            position: "after",
-          }
-        },
-        {
-          data: "flowBuild",
-          renderer: tools.customDropdownRenderer,
-          editor: "chosen",
-          chosenOptions: {
-            // multiple: true,//多选
-            // data: item.DataSource.Content || ""
-          }
-        },
-        {
-          data: "system",
-          renderer: tools.customDropdownRenderer,
-          editor: "chosen",
-          chosenOptions: {
-            // multiple: true,//多选
-            // data: item.DataSource.Content || ""
-          }
-        }
-      );
-      data = data.filter(item => item);
-      return data;
-    },
-
-    //初始化插件
-    initHot() {
-      var container = document.getElementById("myHandson");
-      let winHeight = document.documentElement.clientHeight;
-      this.hot = new Handsontable(container, {
-        data: this.main,
-        colHeaders: this.delHeader(this.headers), //表头文案
-        columns: this.getType(this.headers), //数据显示格式
-        filters: true,
-        height: winHeight - 100 - 50 - 60,
-        columnSorting: true, //添加排序
-        sortIndicator: true, //添加排序
-        renderAllRows: true,
-        autoColumnSize: true,
-        language: "zh-CN",
-        manualColumnResize: true,
-        manualColumnMove: true,
-        dropdownMenu: [
-          "filter_by_condition",
-          "filter_by_value",
-          "filter_action_bar"
-        ],
-        contextMenu: this.onlyRead ? false :{
-          items: {
-            remove_row: {
-              name: "删除该业务空间"
-            }
-          }
-        },
-        // 事件
-        afterChange: this.tdChange, //修改后
-        afterFilter: this.trimmedRows, //排序前
-        beforeRemoveRow: this.romoveFm, //右键删除
-        afterOnCellMouseDown: this.eventClick //鼠标点击
-      });
-      let pro = document.getElementById("hot-display-license-info");
-      if (!!pro) {
-        pro.parentNode.removeChild(pro);
-      }
-      this.isLoading = false;
-    },
-
-    //表格中的点击
-    eventClick(el, rowArr) {
-      let filter = this.filtersArr;
-      //被筛选过后的数组
-      let trimmedArr = this.trimmedRows();
-      //是否启用了排序
-      let isSort = this.hot.getPlugin("columnSorting").isSorted();
-      if (trimmedArr.length && isSort) {
-        let sortArr = this.myHotArr.getPlugin("columnSorting").rowsMapper
-          .__arrayMap;
-        let infos = this.main[trimmedArr[sortArr[rowArr.row]]];
-        this.getInfors(infos, rowArr);
-      } else if (isSort) {
-        //排序后的数组
-        let sortArr = this.hot.getPlugin("columnSorting").rowsMapper.__arrayMap;
-        let infos = this.main[sortArr[rowArr.row]];
-        this.getInfors(infos, rowArr);
-      } else if (trimmedArr.length) {
-        let infos = this.main[trimmedArr[rowArr.row]];
-        this.getInfors(infos, rowArr);
-      } else {
-        let infos = this.main[rowArr.row];
-        this.getInfors(infos, rowArr);
-      }
-    },
-
-    getInfors(infos, row) {
-      //点击的是表头
-      if (row.row < 0) {
-        return;
-      }
-      //其他的开始判断
-      let val = this.hot.colToProp(row.col);
-      if (val == "infos.EquipQRCode") {
-        this.dialog.qrcode = true;
-        this.$refs.qrcode.getCanvas(1111);
-      }
-
-      if (val == "infos.Brand" || val == "infos.Specification") {
-        this.dialog.firm = true;
-      }
-
-      if (val == "infos.SupplierContractID") {
-        this.dialog.supply = true;
-      }
-
-      if (val == "infos.InsuranceNum") {
-        //选择保单
-        this.dialog.guarantee = true;
-      }
-
-      if (val == "infos.InsuranceFile" || val == "infos.Archive") {
-        alert("上传文件");
-      }
-
-      if (
-        val == "infos.InstallLocation" ||
-        val == "infos.InstallPic" ||
-        val == "infos.InstallDrawing" ||
-        val == "infos.Nameplate" ||
-        val == "infos.Pic" ||
-        val == "infos.Drawing"
-      ) {
-        alert("上传图片");
-      }
-
-      if (
-        val == "infos.maintainer" ||
-        val == "infos.Supplier" ||
-        val == "infos.Insurer" ||
-        val == "infos.InsurerContactor"
-      ) {
-        this.dialog.supplier = true;
-      }
-      console.log(val);
-    },
-
-    //获取被筛选掉的行号
-    trimmedRows() {
-      // var plugin = hot.getPlugin('trimRows').trimmedRows;//获取被筛选掉的行号
-      var plugin = this.hot.getPlugin("trimRows").trimmedRows;
-      let dataLength = this.main.length;
-      let dataArr = new Array();
-      for (let i = 0; i < dataLength; i++) {
-        dataArr.push(i);
-      }
-      if (plugin.length <= 0) {
-        dataArr = undefined;
-      } else {
-        dataArr = this.array_diff(dataArr, plugin);
-      }
-      return dataArr || [];
-      // var DataArray = new Array();
-
-      // for (var i = 0; i < plugin.length; i++) {
-      //     // 通过行号获取数据
-      //     DataArray.push(this.hot.getSourceDataAtRow(plugin[i]));
-      // }
-    },
-
-    //判断是否为空行
-    isEmptyRow(instance, row) {
-      var rowData = instance.countRows();
-      for (var i = 0, ilen = rowData.length; i < ilen; i++) {
-        if (rowData[i] !== null) {
-          return false;
-        }
-      }
-      return true;
-    }
-  },
-  watch: {
-    deviceType: {
-      handler(newName, oldName) {
-        this.getData()
-      },
-      immediate: true
-    }
-  }
-};
-</script>
-<style lang="less">
-.hanson-bar {
-  height: 40px;
-  padding: 5px 10px;
-  font-size: 14px;
-  overflow: hidden;
-  margin-top: 10px;
-  .iconfont {
-    font-size: 12px;
-  }
-  .el-button {
-    // margin-right: 10px;
-  }
-}
-</style>

+ 28 - 8
src/components/ledger/lib/bimDialog.vue

@@ -10,7 +10,7 @@
     <div id='bim-code' v-if='Object.keys(bimcodeobj).length>0'>
       <div class='eq'>
         <span class='eq-name'>设备名称 &nbsp;&nbsp;</span>
-        {{ bimcodeobj.EquipLocalName || bimcodeobj.EquipName || '--' }}
+        {{ bimcodeobj.localName || bimcodeobj.name || '--' }}
       </div>
       <div>
         <noAllDataFloor @change='changeFloor' ref='floors' @getFloorMap='getFloorMap'></noAllDataFloor>
@@ -22,7 +22,7 @@
         <p v-show='!isdata'>当前楼层暂无平面图,请前往“建筑楼层管理”中给楼层添加平面图</p>
       </div>
     </div>
-    <div slot='footer' class='footer'>
+    <div slot='footer' class='footer' v-if="!read">
       <el-button @click='handleClose'>取 消</el-button>
       <el-button type='primary' @click='save'>确 定</el-button>
     </div>
@@ -51,6 +51,10 @@ export default {
     bimcodeobj: {
       default: {},
     },
+    read: {
+      default: true,
+      type: Boolean
+    }
   },
   data() {
     return {
@@ -112,9 +116,22 @@ export default {
           that.getGraphtSuc(res)
         })
       } else if (type == 3) {
+        let x = 0;
+        let y = 0;
+        let scale = 1;
+        if (this.floorData && this.floorData.infos && this.floorData.infos.floorMapRatio && this.floorData.infos.floorMapShift) {
+          try {
+            const point = JSON.parse(this.floorData.infos.floorMapShift);
+            x = point.x;
+            y = point.y;
+            scale = this.floorData.infos.floorMapRatio;
+          } catch (err) {
+            console.log(err);
+          }
+        }
         that.drawMainScene.loadImg(`/image-service/common/image_get?systemId=dataPlatform&key=${Id}`, (res) => {
-          that.getGraphtSuc(res)
-        })
+            that.getGraphtSuc(res)
+        }, x, y, scale)
       }
     },
     // 获取底图成功
@@ -122,7 +139,7 @@ export default {
       this.canvasLoading = false
       if (res == 'error') {
         this.FloorMap = ''
-        this.$message.warning('数据解析异常')
+        console.log('数据解析异常');
         return
       }
       if (res.Result == 'failure') {
@@ -141,7 +158,9 @@ export default {
       }
       this.view.fitSceneToView()
       this.drawMainScene.isSpaceSelectable = false
-      this.drawMainScene.spaceClick(this, this.canvasClick) //锚点触发
+      if (!this.read) {
+        this.drawMainScene.spaceClick(this, this.canvasClick) //锚点触发
+      }
       if (this.floorData.outline && this.floorData.outline.length) {
         let newArr = this.floorData.outline.map((t) => {
           return new SPoint(t.X, t.Y)
@@ -223,9 +242,10 @@ export default {
     canvasClick(item, event) {
       if (item instanceof SGraphItem) {
         this.clearMark()
+        const p = item.mapToScene(event[0].x, event[0].y)
         let obj = {
-          X: event[0].x,
-          Y: event[0].y,
+          X: p.x,
+          Y: p.y,
         }
         this.drawMainScene.addMarker(obj)
         this.view.fitSceneToView()

+ 1 - 1
src/components/ledger/lib/buildfloorCascader.vue

@@ -29,7 +29,7 @@ export default {
     getCascader() {
       let param = {
         cascade: [
-          { name: "floor", orders: "floorSequenceId desc" }
+          { name: "floor", orders: "floorSequenceID desc" }
         ],
         orders: "localName asc",
         pageNumber: 1,

+ 120 - 0
src/components/ledger/lib/buildingDialog.vue

@@ -0,0 +1,120 @@
+<!--
+    systemType 设备所属类型
+-->
+<template>
+    <el-dialog title="所属建筑" :visible.sync="dialog.building" width="750px">
+        <div style="height: 50px;">
+            <el-select v-model="valueList" :disabled="onlyRead" multiple clearable filterable placeholder="请选择" style="width: 100%;">
+                <el-option v-for="item in buildingData" :key="item.id" :label="item.localName" :value="item.id"> </el-option>
+            </el-select>
+        </div>
+        <span slot="footer" class="dialog-footer" v-if="!onlyRead">
+            <el-button type="primary" @click="getChange">确 定</el-button>
+        </span>
+    </el-dialog>
+</template>
+<script>
+import { buildingQuery, shaftLinkBuild } from "@/api/scan/request"
+import { mapGetters } from 'vuex'
+
+export default {
+    props: {
+        dialog: {
+            type: Object,
+            default: function () {
+                return {
+                    building: true
+                };
+            }
+        },
+        shaftId: {
+            type: String,
+            default: ""
+        },//设备id
+        onlyRead: {
+            type: Boolean,
+            default: false
+        },
+        buildingList: {
+            type: [Array]
+        }
+    },
+    data() {
+        return {
+            buildingData: [],
+            valueList: [] //选中的建筑
+        };
+    },
+    computed: {
+        ...mapGetters("layout", ["projectId"])
+    },
+    created() {
+        this.getBuildingData();
+    },
+    methods: {
+        getBuildingData() {
+            let param = {
+                orders: "localName asc",
+                pageNumber: 1,
+                pageSize: 1000
+            }
+            buildingQuery(param, res => {
+                if (res.result == 'success') {
+                    this.buildingData = res.content;
+                } else {
+                    this.$message.error(res.message)
+                }
+            })
+        },
+        getLinkBuildingData(){
+            this.valueList = this.buildingList.map(item => { return item.id })
+        },
+        getChange() {
+            if (this.shaftId) { //有竖井id
+                const params = {
+                    shaftId: this.shaftId,
+                    buildingIdList: this.valueList
+                }
+               shaftLinkBuild(params, res => {
+                   if (res.result === 'success') {
+                       this.$message.success("关联成功!");
+                       const linkBuild = this.buildingData.filter(item => {
+                            return this.valueList.find(id => {return item.id === id});
+                        })
+                        this.$emit("change", linkBuild);
+                        this.dialog.building = false;
+                        this.multipleSelection = [];
+                   } else {
+                       this.$message.error(this.message);
+                   }
+               })
+            } else {
+                const linkBuild = this.buildingData.filter(item => {
+                    return this.valueList.find(id => {return item.id === id});
+                })
+                this.$emit("change", linkBuild);
+                this.dialog.building = false;
+                this.multipleSelection = [];
+            }
+        }
+    },
+    watch: {
+        dialog: {
+            deep: true,
+            handler() {
+                if (this.dialog.building) {
+                    this.getLinkBuildingData()
+                }
+            }
+        },
+        projectId() {
+            this.buildingData = [];
+            this.valueList = [];
+            this.getBuildingData();
+        }
+    }
+};
+</script>
+
+<style lang="less">
+</style>

+ 4 - 1
src/components/ledger/lib/cascader.vue

@@ -98,6 +98,8 @@ export default {
         }
         param2.filters = param2.filters.slice(1)
       }
+      console.log(param2,'param2')
+
       let param1 = {
         type: "equipment"
       }
@@ -112,6 +114,7 @@ export default {
           resolve(res)
         })
       })
+
       Promise.all([promise1, promise2]).then((res) => {
         let allData = res[0], data = res[1]
         this.options = this.formatOptions(allData.content)
@@ -129,7 +132,7 @@ export default {
     //格式化options数据
     formatOptions(arr) {
       let data = [];
-      arr.map(t => {
+      arr && arr.map(t => {
         let temp = {};
         temp.code = t.code;
         temp.facility = t.name === t.aliasName ? t.name : `${t.name}(${t.aliasName})`;

+ 12 - 3
src/components/ledger/lib/cenoteGraphy.vue

@@ -73,7 +73,7 @@ export default {
   methods: {
     //获取楼层map
     getFloorMap(buildfloor, space) {
-      if (buildfloor.length == 2 && space && buildfloor[1] && buildfloor[0]) {
+      if (buildfloor.length == 2 && space && buildfloor[0] && buildfloor[1] && buildfloor[1] !== 'all' && buildfloor[1] !== 'noKnow') {
         this.buildingData = buildfloor
         let pa = {
           filters: `id='${this.buildingData[1]}'`
@@ -114,7 +114,7 @@ export default {
         that.canvasLoading = false;
         if (res == 'error') {
           this.floorMap = '';
-          this.$message.warning('数据解析异常');
+          console.log('数据解析异常');
           return;
         }
         that.view.scene = that.scene;
@@ -195,6 +195,13 @@ export default {
         this.scene.removeAllZone();
         this.scene.addZoneList(tempArr);
         this.scene.click(this, this.canvasClick);
+        if (this.config.isEdit) {
+            this.scene.zoneList.map(t => {
+                t.selected = t.highLightFlag;
+                t.transparency = 20;
+                t.highLightFlag = false;
+            })
+        }
         this.canvasLoading = false;
       })
     },
@@ -223,7 +230,9 @@ export default {
     //取消编辑
     cancelEdit() {
       this.config.isEdit = false;
-      this.scene.clearZoneSelection();
+      if (this.scene) {
+        this.scene.clearZoneSelection();
+      }
       this.getBusinessSpace();
     },
     //编辑

+ 108 - 0
src/components/ledger/lib/excelDialog.vue

@@ -0,0 +1,108 @@
+<template>
+  <el-dialog title="深化点表导入" :visible.sync="dialogFormVisible" class="dialogFormVisible" @close="messageKey = ''">
+    <h5 class="title">深化点表前四列须按照“设备本地编码(A列)”、“信息点编码(B列)”、“表号(C列)”、“功能号(D列)”的顺序整理,第1行为标题,从第2行开始填写具体内容。</h5>
+    <p class="time">
+      <el-button type="text" :disabled="!messageKey" @click="download">下载导入结果</el-button>
+    </p>
+    <el-upload
+      class="upload-demo"
+      v-loading='loading'
+      drag
+      action="/api/datacenter/graphic/import/point"
+      :show-file-list='false'
+      :headers="headers"
+      name="file"
+      multiple
+      :on-progress="progress"
+      :on-success="success"
+      :on-error="error">
+      <i class="el-icon-upload"></i>
+      <div class="el-upload__text">将Excel文件拖到此处,或<em>点击上传Excel文件</em></div>
+      <div class="el-upload__tip tips" slot="tip">上传的Excel数据将完全覆盖当前设备信息点(原有数据不会保留)</div>
+    </el-upload>
+
+  </el-dialog>
+</template>
+
+<script>
+import storage from '@/framework/utils/storage'
+import {mapGetters} from 'vuex'
+
+export default {
+  name: "excelDialog",
+  data() {
+    return {
+      dialogFormVisible: false,
+      messageKey: '',
+      loading: false
+    }
+  },
+  computed: {
+    ...mapGetters('layout', ['projectId']),
+    headers() {
+      return {
+        'ProjectId': this.projectId,
+        'Comming': 'adm',
+        'Account': storage.get("user_name")
+      }
+    },
+  },
+  methods: {
+    openDialog() {
+      this.dialogFormVisible = true
+    },
+    progress(event, file, fileList) {
+      this.loading = true
+    },
+    success(event, file, fileList) {
+      if (event.result == 'success') {
+        this.loading = false
+        this.messageKey = event.message
+        this.$message.success('上传成功')
+      } else {
+        this.loading = false
+        this.messageKey =''
+        this.$message.error('目前只支持.xlsx格式,请重新上传')
+      }
+    },
+    error(event, file, fileList) {
+    },
+    download() {
+      const url = '/api/datacenter/graphic/downloads/point?key=' + this.messageKey
+      let a = document.createElement("a");
+      a.href = url;
+      a.download = `${this.messageKey}.xlsx`;
+      a.click();
+    }
+  }
+}
+</script>
+
+<style scoped lang="less">
+.dialogFormVisible {
+  .time {
+    margin: 10px 0;
+    font-size: 15px;
+
+    .text {
+      margin-right: 10px;
+      font-size: 14px;
+    }
+  }
+
+  .tips {
+    color: red;
+    font-size: 14px;
+    font-weight: bold;
+  }
+
+  /deep/ .el-upload {
+    width: 100%;
+  }
+
+  /deep/ .el-upload-dragger {
+    margin: 0 auto;
+    width: 100%;
+  }
+}
+</style>

+ 3 - 5
src/components/ledger/lib/floorCascader.vue

@@ -71,7 +71,7 @@
                         "localName"
                     ]
                 }, floorParams = {
-                    orders: "floorSequenceId desc",
+                    orders: "floorSequenceID desc",
                     pageNumber: 1,
                     pageSize: 1000
                 }
@@ -107,10 +107,9 @@
                                     build.children.push({
                                         value: floor.id,
                                         label: floor.localName,
-                                        FloorSequenceID: floor.floorSequenceId,
+                                        FloorSequenceID: floor.floorSequenceID,
                                         infos: floor.infos || {},
                                         outline: floor.outline || null,
-                                        properties: floor.properties || null
                                     })
                                 } else {
                                     build.children = []
@@ -123,10 +122,9 @@
                                     },{
                                         value: floor.id,
                                         label: floor.localName,
-                                        FloorSequenceID: floor.floorSequenceId,
+                                        FloorSequenceID: floor.floorSequenceID,
                                         infos: floor.infos || {},
                                         outline: floor.outline || null,
-                                        properties: floor.properties || null
                                     })
                                 }
                             }

+ 38 - 36
src/components/ledger/lib/linkassets.vue

@@ -15,7 +15,7 @@
     <el-row style="margin-top:30px;" v-show="spaceShow">
       <span class="condition-title">分区类型:</span>
       <el-select v-model="zone" filterable size="small" @change="handleChangeZone" style="width:350px;">
-        <el-option v-for="item in zoneList" :key="item.Code" :label="item.Name" :value="item.Code"></el-option>
+        <el-option v-for="item in zoneList" :key="item.code" :label="item.name" :value="item.code"></el-option>
       </el-select>
     </el-row>
     <el-row style="margin-top:30px;" v-show="spaceShow && zone != 'all' && zone != 'noKnow'">
@@ -86,7 +86,7 @@ export default {
     //获取未关联资产的设备或部件类型
     getPartsDieType() {
       let _this = this
-      TypePartsDie(res => {
+      TypePartsDie(res => {       
         _this.deviceTypeList = res.content
       })
     },
@@ -101,14 +101,14 @@ export default {
           "localName"
         ]
       }, floorParams = {
-        orders: "floorSequenceId desc",
+        orders: "floorSequenceID desc",
         pageNumber: 1,
         pageSize: 1000,
         projection: [
           "buildingId",
           "id",
           "localName",
-          "floorSequenceId"
+          "floorSequenceID"
         ]
       }
       let promise1 = new Promise((resolve, reject) => {
@@ -143,7 +143,7 @@ export default {
                 build.children.push({
                   value: floor.id,
                   label: floor.localName,
-                  FloorSequenceID: floor.floorSequenceId
+                  FloorSequenceID: floor.floorSequenceID
                 })
               } else {
                 build.children = []
@@ -156,7 +156,7 @@ export default {
                 }, {
                   value: floor.id,
                   label: floor.localName,
-                  FloorSequenceID: floor.floorSequenceId
+                  FloorSequenceID: floor.floorSequenceID
                 })
               }
             }
@@ -171,22 +171,24 @@ export default {
         type: "space"
       }
       queryPhysicsAllType(params, res => {
-        this.zoneList = res.content.filter(item => {
-          if (item.name !== item.aliasName) {
-            item.name = `${item.name}(${item.aliasName})`
-          }
-          if (item.code != 'Ispace') {
-            return item
-          }
-        })
-        this.zoneList.unshift({
-          name: '全部',
-          code: 'all'
-        })
-        this.zoneList.push({
-          name: '不在任何业务空间内',
-          code: 'noKnow'
-        })
+        if (res.content) {
+					this.zoneList = res.content.filter(item => {
+						if (item.name !== item.aliasName) {
+							item.name = `${item.name}(${item.aliasName})`
+						}
+						if (item.code != 'Ispace') {
+							return item
+						}
+					})
+					this.zoneList.unshift({
+						name: '全部',
+						code: 'all'
+					})
+					this.zoneList.push({
+						name: '不在任何业务空间内',
+						code: 'noKnow'
+					})
+				}
       })
     },
     // 修改设备类型
@@ -204,7 +206,7 @@ export default {
     //判断是否显示空间分区选择
     zoneListIsShow() {
       let lastVal = this.buildFloor.slice(-1)[0]
-      if (!lastVal || lastVal == 'noKnow' || this.buildFloor[0] == 'all' || this.deviceType.length != 4) {
+      if (!lastVal || lastVal == 'noKnow' || this.buildFloor[0] == 'all' || this.deviceType.length != 6) {
         this.spaceShow = false
       } else {
         this.spaceShow = true
@@ -224,27 +226,27 @@ export default {
         let recursionGetData = (pageNum, zone) => {
           pageNum = pageNum ? pageNum : 1
           let params = {
-            Orders: "CreateTime desc, id asc",
-            PageNumber: pageNum,
-            PageSize: 1000,
-            Projection: ["id", "RoomName", "RoomLocalName", "CreateTime"],
-            ZoneType: zone
+            orders: "createTime desc, id asc",
+            pageNumber: pageNum,
+            pageSize: 1000,
+            projection: ["id", "name", "localName", "createTime"],
+            zoneType: zone
           }
           if (this.spaceShow) {
             if (this.buildFloor.length == 2 && this.buildFloor[1] != 'all') {
-              pa.BuildingId = this.buildFloor[0];
-              pa.FloorId = this.buildFloor[1];
+              params.buildingId = this.buildFloor[0];
+              params.floorId = this.buildFloor[1];
             } else {
-              pa.BuildingId = this.buildFloor[0];
+              params.buildingId = this.buildFloor[0];
             }
           }
           zoneQuery(params, res => {
-            nodes = nodes.concat(res.Content.map(item => ({
-              value: item.RoomID,
-              label: item.RoomLocalName ? item.RoomLocalName : item.RoomName
+            nodes = nodes.concat(res.content.map(item => ({
+              value: item.id,
+              label: item.localName ? item.localName : item.name
             })))
-            if (res.Total / (res.PageSize * res.PageNumber) > 1) {
-              recursionGetData(res.PageNumber + 1, zone)
+            if (res.total / (res.pageSize * res.pageNumber) > 1) {
+              recursionGetData(res.pageNumber + 1, zone)
             } else {
               this.spaceList = nodes
             }

+ 3 - 3
src/components/ledger/lib/noAllDataFloor.vue

@@ -74,7 +74,7 @@ export default {
           "localName"
         ]
       }, floorParams = {
-        orders: "floorSequenceId desc",
+        orders: "floorSequenceID desc",
         pageNumber: 1,
         pageSize: 1000
       }
@@ -108,7 +108,7 @@ export default {
                 build.children.push({
                   value: floor.id,
                   label: floor.localName,
-                  FloorSequenceID: floor.floorSequenceId
+                  FloorSequenceID: floor.floorSequenceID
                 })
               } else {
                 build.children = []
@@ -118,7 +118,7 @@ export default {
                 }, {
                   value: floor.id,
                   label: floor.localName,
-                  FloorSequenceID: floor.floorSequenceId
+                  FloorSequenceID: floor.floorSequenceID
                 })
               }
             }

+ 11 - 1
src/components/ledger/lib/spaceSelect.vue

@@ -24,12 +24,15 @@ export default {
     isWidth: {
       type: Boolean,
       default: true
+    },
+    isAll: {
+			type: Boolean,
+			default: false
     }
   },
   data() {
     return {
       value:[null],
-      spaceVal: null,//值
       options: [],
       props: {
         isWidth:false
@@ -47,6 +50,13 @@ export default {
       //Cascade: [{ Name: 'zoneType', Filters: `ProjectId='${this.projectId}'` }]
       queryAllZoneType(params1, res => {
         this.options = res.content;
+        if (this.isAll) {
+					this.options.unshift({
+						code: "",
+						name: "全部"
+					});
+					this.value = [''];
+        }
         this.changeVal(this.value);
       })
     },

+ 6 - 2
src/components/ledger/lib/system.vue

@@ -84,8 +84,10 @@ export default {
       }
       queryLinkSys(param, res => {
         this.options = res.content;
-        if (this.value) {
+        if (this.value && this.options.find(item => item.classCode === this.value)) {
           this.changeVal(this.value)
+        } else {
+            this.changeVal("")
         }
       })
     },
@@ -95,8 +97,10 @@ export default {
       }
       queryPhysicsAllType(param, res => {
         this.options = this.changeArr(res.content)
-        if (this.value) {
+        if (this.value && this.options.find(item => item.classCode === this.value)) {
           this.changeVal(this.value)
+        } else {
+            this.changeVal("")
         }
       })
     },

+ 4 - 4
src/components/ledger/lib/uploadFiles.vue

@@ -101,10 +101,10 @@ export default {
 
       //点击下载
       download(item) {
-        if (item.Key) {
+        if (item.key) {
           let a = document.createElement("a");
-          a.href = `/image-service/common/file_get/${item.Key}?systemId=dataPlatform`;
-          a.download = `${item.Name}`;
+          a.href = `/image-service/common/file_get/${item.key}?systemId=dataPlatform`;
+          a.download = `${item.name}`;
           a.click();
           document.body.removeChild(a);
         } else {
@@ -149,7 +149,7 @@ export default {
           reader.onprogress = function (p) {
             // 这个事件在读取进行中定时触发
             let value = (p.loaded / size) * 100;
-            console.log(p.loaded,size,value,'loaded')
+            // console.log(p.loaded,size,value,'loaded')
           };
 
           reader.onload = function () {

+ 14 - 9
src/components/ledger/lib/uploadImgsName.vue

@@ -27,8 +27,9 @@
         <form-input :label="''" @change="getName" :keys="index" :value="item.name" :width="10"></form-input>
       </div>
       <!--      v-if="!readOnly && imagesArr.length < max"-->
-      <div style="float:left;">
+      <div style="float:left;" v-loading="uploading">
         <el-upload
+        	v-show="!readOnly"
           class="avatar-uploader"
           :http-request="uploadAndSubmit"
           :show-file-list="false"
@@ -92,7 +93,8 @@ export default {
       iframeSrc: "",
       dialog: {
         details: false
-      }
+      },
+      uploading: false
     };
   },
   created() {
@@ -178,6 +180,7 @@ export default {
         } else {
           // document.getElementById("bytesRead").textContent = file.size;
           // 构造 XMLHttpRequest 对象,发送文件 Binary 数据
+          vm.uploading = true;
           var xhr = new XMLHttpRequest();
           xhr.open(
             /* method */
@@ -191,6 +194,7 @@ export default {
           xhr.onreadystatechange = function () {
             if (xhr.readyState == 4) {
               if (xhr.status == 200) {
+                vm.uploading = false;
                 if (vm.type == 'image') {
                   vm.imagesArr.push(
                     {
@@ -214,13 +218,14 @@ export default {
                   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",
-                    createTime: CreateTime
-                  })
+                    console.log(vm.videoPicArr)
+                //   vm.videoPicArr.push({
+                //     name: uploadKey + '',
+                //     key: uploadKey + "." + type,
+                //     systemId: "dataPlatform",
+                //     type: "image_video",
+                //     createTime: CreateTime
+                //   })
                 }
                 vm.$emit("change", vm.imagesArr, vm.defined, vm.videoPicArr);
               }

+ 1 - 1
src/components/ledger/rentList/roomCountDrawer.vue

@@ -104,7 +104,7 @@ export default {
     },
     getBuilding() {
       let pa = {
-        cascade: [{ name: 'floor', orders: 'floorSequenceId desc' }],
+        cascade: [{ name: 'floor', orders: 'floorSequenceID desc' }],
         order: 'localName asc'
       }
       //todo 检测所有大小写

+ 62 - 62
src/components/ledger/report/dataexport.vue

@@ -31,132 +31,132 @@ export default {
         label: '未关联设备的资产'
       }],
       header1: [{
-        fieldName: "Building.BuildLocalName",
+        fieldName: "building.localName",
         headerName: "建筑"
       }, {
-        fieldName: "Floor.FloorLocalName",
+        fieldName: "floor.localName",
         headerName: "楼层"
       }, {
-        fieldName: "EquipCategory.EquipName",
+        fieldName: "equipCategory.name",
         headerName: "设备类"
       }, {
-        fieldName: "EquipLocalName",
+        fieldName: "localName",
         headerName: "设备本地名称"
       }, {
-        fieldName: "EquipLocalID",
+        fieldName: "localId",
         headerName: "设备本地编码"
       }, {
-        fieldName: "EquipID",
+        fieldName: "id",
         headerName: "设备id"
       }, {
-        fieldName: "BIMID",
+        fieldName: "bimId",
         headerName: "设备BIMID"
       }, {
-        fieldName: "Property.EquipFamilyList.0.FamilyName",
+        fieldName: "property.equipFamilyList.0.familyName",
         headerName: "资产设备族"
       }, {
-        fieldName: "Property.EquipLocalName",
+        fieldName: "property.localName",
         headerName: "资产本地名称"
       }, {
-        fieldName: "Property.EquipLocalID",
+        fieldName: "property.localId",
         headerName: "资产本地编码"
       }, {
-        fieldName: "Property.EquipID",
+        fieldName: "property.id",
         headerName: "资产id"
       }, {
-        fieldName: "Property.CreateTime",
+        fieldName: "property.createTime",
         headerName: "资产创建时间"
       }, {
-        fieldName: "Property.CodeType",
+        fieldName: "property.codeType",
         headerName: "资产现场验证状态"
       }, {
-        fieldName: "LedgerParam.Siteinstall.InstallLocation",
+        fieldName: "infos.installLocation",
         headerName: "安装位置"
       }],
       header2: [{
-        fieldName: "Building.BuildLocalName",
+        fieldName: "building.localName",
         headerName: "建筑"
       }, {
-        fieldName: "Floor.FloorLocalName",
+        fieldName: "floor.localName",
         headerName: "楼层"
       }, {
-        fieldName: "EquipCategory.EquipName",
+        fieldName: "equipCategory.name",
         headerName: "设备类"
       }, {
-        fieldName: "EquipLocalName",
+        fieldName: "localName",
         headerName: "设备本地名称"
       }, {
-        fieldName: "EquipLocalID",
+        fieldName: "localId",
         headerName: "设备本地编码"
       }, {
-        fieldName: "EquipID",
+        fieldName: "id",
         headerName: "设备id"
       }, {
-        fieldName: "BIMID",
+        fieldName: "bimId",
         headerName: "设备BIMID"
       }, {
-        fieldName: "Property.EquipFamilyList.0.FamilyName",
+        fieldName: "property.equipFamilyList.0.familyName",
         headerName: "资产设备族"
       }, {
-        fieldName: "Property.EquipLocalName",
+        fieldName: "property.localName",
         headerName: "资产本地名称"
       }, {
-        fieldName: "Property.EquipLocalID",
+        fieldName: "property.localId",
         headerName: "资产本地编码"
       }, {
-        fieldName: "Property.EquipID",
+        fieldName: "property.id",
         headerName: "资产id"
       }, {
-        fieldName: "Property.CreateTime",
+        fieldName: "property.createTime",
         headerName: "资产创建时间"
       }, {
-        fieldName: "Property.CodeType",
+        fieldName: "property.codeType",
         headerName: "资产现场验证状态"
       }, {
-        fieldName: "LedgerParam.Siteinstall.InstallLocation",
+        fieldName: "infos.installLocation",
         headerName: "安装位置"
       }],
       header3: [{
-        fieldName: "Building.BuildLocalName",
+        fieldName: "building.localName",
         headerName: "建筑"
       }, {
-        fieldName: "Floor.FloorLocalName",
+        fieldName: "floor.localName",
         headerName: "楼层"
       }, {
-        fieldName: "Equipment.EquipCategory.EquipName",
+        fieldName: "equipment.equipCategory.name",
         headerName: "设备类"
       }, {
-        fieldName: "Equipment.EquipLocalName",
+        fieldName: "equipment.localName",
         headerName: "设备本地名称"
       }, {
-        fieldName: "Equipment.EquipLocalID",
+        fieldName: "equipment.localId",
         headerName: "设备本地编码"
       }, {
-        fieldName: "Equipment.EquipID",
+        fieldName: "equipment.id",
         headerName: "设备id"
       }, {
-        fieldName: "Equipment.BIMID",
+        fieldName: "equipment.bimId",
         headerName: "设备BIMID"
       }, {
-        fieldName: "EquipFamilyList.0.FamilyName",
+        fieldName: "equipFamilyList.0.familyName",
         headerName: "资产设备族"
       }, {
-        fieldName: "EquipLocalName",
+        fieldName: "localName",
         headerName: "资产本地名称"
       }, {
-        fieldName: "EquipLocalID",
+        fieldName: "localId",
         headerName: "资产本地编码"
       }, {
-        fieldName: "EquipID",
+        fieldName: "id",
         headerName: "资产id"
       }, {
-        fieldName: "CreateTime",
+        fieldName: "createTime",
         headerName: "资产创建时间"
       }, {
-        fieldName: "CodeType",
+        fieldName: "codeType",
         headerName: "资产现场验证状态"
       }, {
-        fieldName: "LedgerParam.Siteinstall.InstallLocation",
+        fieldName: "infos.installLocation",
         headerName: "安装位置"
       }]
     }
@@ -179,37 +179,37 @@ export default {
         cascade: [
           {
             name: "equipCategory",
-            projection: ["equipCode", "equipName"]
+            // projection: ["equipCode", "name"]
           },
           {
             name: "property",
             cascade: [
               {
                 name: "equipFamilyList",
-                projection: [ "family", "familyName" ]
+                // projection: [ "family", "familyName" ]
               }
             ],
-            projection: ["family", "equipLocalName", "equipLocalID", "equipID", "codeType", "createTime"]
+            // projection: ["family", "localName", "localId", "id", "codeType", "createTime"]
           },
           {
             name: "building",
-            projection: ["localName", "name", "id"]
+            // projection: ["localName", "name", "id"]
           },
           {
             name: "floor",
-            projection: ["localName", "name", "id"]
+            // projection: ["localName", "name", "id"]
           }
         ],
-        filters: " not propertyId isnull ",
-        orders: "createTime desc, equipID asc",
+        filters: "not propertyId isnull",
+        orders: "createTime desc, id asc",
         pageNumber: pageNum,
         pageSize: 1000,
-        projection: ["createTime", "buildingId", "floorId", "classCode", "equipLocalName", "equipLocalID", "equipID", "bimId", "infos"]
+        // projection: ["createTime", "buildingId", "floorId", "classCode", "localName", "localId", "id", "bimId", "infos"]
       }
       queryEquip(params, res => {
         this.dataList = this.dataList.concat(res.content.map((item) => {
           item.property.codeType = State[item.property.codeType]
-          // item.Property.Family = Family[item.Property.Family]
+          // item.property.Family = Family[item.property.Family]
           return item
         }))
         if (res.total / (res.pageSize * res.pageNumber) > 1) {
@@ -227,22 +227,22 @@ export default {
         cascade: [
           {
             name: "equipCategory",
-            projection: ["equipCode", "equipName"]
+            // projection: ["equipCode", "name"]
           },
           {
             name: "building",
-            projection: ["localName", "name", "id"]
+            // projection: ["localName", "name", "id"]
           },
           {
             name: "floor",
-            projection: ["localName", "name", "id"]
+            // projection: ["localName", "name", "id"]
           }
         ],
         filters: " propertyId isnull ",
-        orders: "createTime desc, equipID asc",
+        orders: "createTime desc, id asc",
         pageNumber: pageNum,
         pageSize: 1000,
-        projection: ["createTime", "buildingId", "floorId", "classCode", "equipLocalName", "equipLocalID", "equipID", "bimId", "infos"]
+        // projection: ["createTime", "buildingId", "floorId", "classCode", "localName", "localId", "id", "bimId", "infos"]
       }
       queryEquip(params, res => {
         this.dataList = this.dataList.concat(res.content)
@@ -261,22 +261,22 @@ export default {
         cascade: [
           {
             name: "equipFamilyList",
-            projection: [ "family", "familyName" ]
+            // projection: [ "family", "familyName" ]
           },
           {
             name: "building",
-            projection: [ "localName", "name", "id" ]
+            // projection: [ "localName", "name", "id" ]
           },
           {
             name: "floor",
-            projection: [ "localName", "name", "id" ]
+            // projection: [ "localName", "name", "id" ]
           }
         ],
-        filters: " equipId isnull ",
-        orders: "createTime desc, equipID asc",
+        filters: "id isnull",
+        orders: "createTime desc, id asc",
         pageNumber: pageNum,
         pageSize: 1000,
-        projection: [ "buildingId", "floorId", "family", "equipLocalName", "equipLocalId", "equipId", "createTime", "codeType", "infos"]
+        // projection: [ "buildingId", "floorId", "family", "localName", "localId", "id", "createTime", "codeType", "infos"]
       }
       queryProperty(params, res => {
         this.dataList = this.dataList.concat(res.content.map((item) => {

+ 2 - 2
src/components/ledger/system/dialog/addCenoteDialog.vue

@@ -106,7 +106,7 @@ export default {
   methods: {
     //修改竖井类型
     changeCenote(value) {
-      this.cenoteType = value.Id
+      this.cenoteType = value.id
       this.getTableData()
     },
     // 显示弹窗
@@ -158,7 +158,7 @@ export default {
           this.$emit('refresh')
         })
       } else {
-        this.$message('请选择要关联的设备')
+        this.$message('请选择要关联的竖井')
       }
     },
     //改变pagesize

+ 97 - 43
src/components/ledger/system/dialog/addEquipDialog.vue

@@ -1,49 +1,97 @@
 <template>
-  <el-dialog :title="title" :visible.sync="dialogVisible" width="900px" id="addEqDialog">
+  <el-dialog
+    :title="title"
+    :visible.sync="dialogVisible"
+    width="900px"
+    id="addEqDialog"
+  >
     <el-row class="filters">
-      <el-col :span="7" style="width:268px">
-        <el-input placeholder="输入设备名称或设备本地编码进行查询" v-model="keycode" clearable @keyup.enter.native="getTableData">
-          <i slot="suffix" class="el-input__icon el-icon-search" @click="getTableData"></i>
+      <el-col :span="7" style="width: 268px">
+        <el-input
+          placeholder="输入设备名称或设备本地编码进行查询"
+          v-model="keycode"
+          clearable
+          @keyup.enter.native="inputMsg"
+        >
+          <i
+            slot="suffix"
+            class="el-input__icon el-icon-search"
+            @click="inputMsg"
+          ></i>
         </el-input>
       </el-col>
-      <el-col :span="8.5" style="padding:0 0;">
-        <floor-cascader @change="changeFloor" style="margin-left:5px;"></floor-cascader>
+      <el-col :span="8.5" style="padding: 0 0">
+        <floor-cascader
+          @change="changeFloor"
+          style="margin-left: 5px"
+        ></floor-cascader>
       </el-col>
-      <el-col :span="8.5" style="padding-right:0;">
+      <el-col :span="8.5" style="padding-right: 0">
         <myCascader @change="changeDevice" :params="childParams"></myCascader>
       </el-col>
     </el-row>
 
     <div class="table-box">
-      <el-table :data="tableData" style="width: 100%" height="350" v-loading="loading" :header-cell-style="headerStyle"
-                ref="multipleTable"
-                @selection-change="handleSelectionChange">
+      <el-table
+        :data="tableData"
+        style="width: 100%"
+        height="350"
+        v-loading="loading"
+        :header-cell-style="headerStyle"
+        ref="multipleTable"
+        @selection-change="handleSelectionChange"
+      >
         <el-table-column type="selection" width="55"></el-table-column>
-        <el-table-column :label="`${inSpaceType}名称`" show-overflow-tooltip min-width="100">
+        <el-table-column
+          :label="`${inSpaceType}名称`"
+          show-overflow-tooltip
+          min-width="100"
+        >
           <template slot-scope="scope">
-            <div>{{ scope.row.localName || scope.row.name || '' }}</div>
+            <div>{{ scope.row.localName || scope.row.name || "" }}</div>
           </template>
         </el-table-column>
-        <el-table-column prop="localId" :label="`${inSpaceType}本地编码`" show-overflow-tooltip
-                         min-width="100"></el-table-column>
-        <el-table-column prop="equipCategory.name" :label="`${inSpaceType}类`" show-overflow-tooltip
-                         min-width="100"></el-table-column>
+        <el-table-column
+          prop="localId"
+          :label="`${inSpaceType}本地编码`"
+          show-overflow-tooltip
+          min-width="100"
+        ></el-table-column>
+        <el-table-column
+          prop="equipCategory.name"
+          :label="`${inSpaceType}类`"
+          show-overflow-tooltip
+          min-width="100"
+        ></el-table-column>
         <el-table-column prop="action" label="操作" min-width="100">
           <template slot-scope="scope">
-            <el-button size="mini" @click="toDetail(scope.$index, scope.row)" plain>查看详情</el-button>
+            <el-button
+              size="mini"
+              @click="toDetail(scope.$index, scope.row)"
+              plain
+              >查看详情</el-button
+            >
           </template>
         </el-table-column>
       </el-table>
       <!-- 分页 -->
-      <el-pagination class="fr" v-show="tableData && tableData.length" @size-change="handleSizeChange"
-                     @current-change="handleCurrentChange"
-                     :current-page="page.pageNumber" :page-sizes="page.pageSizes" :page-size="page.pageSize"
-                     layout="total, sizes, prev, pager, next, jumper"
-                     :total="page.total"></el-pagination>
+      <el-pagination
+        class="fr"
+        v-show="tableData && tableData.length"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="page.pageNumber"
+        :page-sizes="page.pageSizes"
+        :page-size="page.pageSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="page.total"
+      ></el-pagination>
     </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>
+      <el-button size="small" type="primary" @click="savaRelation"
+        >确 定</el-button
+      >
     </span>
   </el-dialog>
 </template>
@@ -57,7 +105,7 @@ import { mapGetters } from "vuex";
 export default {
   components: {
     floorCascader,
-    myCascader
+    myCascader,
   },
 
   data() {
@@ -75,13 +123,13 @@ export default {
         pageSize: 50,
         pageSizes: [10, 20, 50, 100],
         pageNumber: 1,
-        total: 0
+        total: 0,
       },
       headerStyle: {
         backgroundColor: "#e1e4e5",
         color: "#2b2b2b",
-        lineHeight: "30px"
-      } // 列表样式,
+        lineHeight: "30px",
+      }, // 列表样式,
     };
   },
   computed: {
@@ -90,18 +138,18 @@ export default {
       let temp = JSON.parse(JSON.stringify(this.params));
       temp.SysType = null;
       return temp;
-    }
+    },
   },
   props: {
     type: String, //选中的tab页
-    params: Object //查看的竖井关系信息
-  },
-  created() {
+    params: Object, //查看的竖井关系信息
   },
+  created() {},
   methods: {
     //修改建筑楼层
     changeFloor(value) {
       this.Buildfloor = value;
+      this.page.pageNumber = 1;
       this.getTableData();
     },
     // 显示弹窗
@@ -111,6 +159,11 @@ export default {
       this.tableData = [];
       this.getTableData();
     },
+    // 搜索框
+    inputMsg() {
+      this.page.pageNumber = 1;
+      this.getTableData();
+    },
     getTableData() {
       let params = {
         data: {
@@ -139,15 +192,15 @@ export default {
       if (this.Equipcategory) {
         params.data.filters += `;classCode='${this.Equipcategory}'`;
       }
-      unSysEq(params, res => {
-        res.content.forEach(item => {
+      unSysEq(params, (res) => {
+        res.content.forEach((item) => {
           item.ShaftListName = "";
           if (item.shaftList && item.shaftList.length) {
-            item.ShaftListName = item.shaftList.map(shaft => {
-              return shaft.localName
-                ? shaft.localName
-                : shaft.name;
-            }).join("、");
+            item.ShaftListName = item.shaftList
+              .map((shaft) => {
+                return shaft.localName ? shaft.localName : shaft.name;
+              })
+              .join("、");
           }
         });
         this.tableData = res.content;
@@ -162,11 +215,11 @@ export default {
       if (this.selections.length) {
         let params = {
           sysId: this.$route.query.SysID,
-          equipIdList: this.selections.map(item => {
+          equipIdList: this.selections.map((item) => {
             return item.id;
-          })
+          }),
         };
-        sysLinkEquip(params, res => {
+        sysLinkEquip(params, (res) => {
           this.dialogVisible = false;
           this.$message.success("关联成功!");
           this.$emit("refresh");
@@ -177,6 +230,7 @@ export default {
     },
     //修改设备类别
     changeDevice(value) {
+      this.page.pageNumber = 1; //pageSize初始化
       this.Equipcategory = value.code;
       this.getTableData();
     },
@@ -193,8 +247,8 @@ export default {
     // 查看详情
     toDetail() {
       this.$message("开发中");
-    }
-  }
+    },
+  },
 };
 </script>
 <style lang="less" scoped>

+ 27 - 9
src/components/ledger/system/dialog/addSpaceDialog.vue

@@ -10,7 +10,7 @@
         <floor-cascader ref="floorcas" @change="changeFloor"></floor-cascader>
       </el-col>
       <el-col :span="7.5" style="padding:0 0;">
-        <space-select ref="spacesel" @change="changeSpace"></space-select>
+        <space-select ref="spacesel" :isAll="true" @change="changeSpace"></space-select>
       </el-col>
     </el-row>
     <el-row class="filters" :gutter="20"></el-row>
@@ -24,7 +24,8 @@
             {{ scope.row.localName || scope.row.name || '' }}
           </template>
         </el-table-column>
-        <el-table-column prop="localId" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="localId" :label="`${inSpaceType}本地编码`" show-overflow-tooltip
+                         min-width="100"></el-table-column>
         <el-table-column prop :label="`所属建筑楼层`" show-overflow-tooltip min-width="100">
           <template slot-scope="scope">
             {{
@@ -34,7 +35,7 @@
         </el-table-column>
         <el-table-column prop="objectType" :label="`空间类型`" show-overflow-tooltip min-width="100">
           <template slot-scope="scope">
-            {{ spaceType[scope.row.objectType] || '' }}
+            {{ spaceType[scope.row.classCode] || '' }}
           </template>
         </el-table-column>
         <el-table-column prop="action" label="操作" min-width="100">
@@ -87,6 +88,7 @@ export default {
       inSpaceType: "业务空间",
       Buildfloor: ["all"], // 选中的建筑楼层
       Spacecategory: null, // 选中的业务空间类型
+      spaceValue: [""], //记录切换成功的业务空间值
       tableData: [],
       floorData: {}, //楼层
       spaceData: {}, //业务空间分区
@@ -121,13 +123,29 @@ export default {
     },
     //修改建筑楼层
     changeFloor(value) {
+      this.page.pageNumber = 1;
       this.Buildfloor = value;
       this.getTableData();
     },
     //修改空间类型
-    changeSpace(value) {
-      this.Spacecategory = value;
-      this.getTableData();
+    changeSpace(val, space, value) {
+      if (this.selections.length) {
+        this.$confirm('关联的业务空间未保存, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.Spacecategory = val;
+          this.spaceValue = value;
+          this.getTableData();
+        }).catch(() => {
+          this.$refs.spacesel.value = this.spaceValue;
+        });
+      } else {
+        this.Spacecategory = val;
+        this.spaceValue = value;
+        this.getTableData();
+      }
     },
     getTableData() {
       let params = {
@@ -151,10 +169,10 @@ export default {
         params.data.filters += `;floorId='${this.Buildfloor[1]}'`;
       }
       if (this.Spacecategory) {
-        params.data.filters += `;objectType='${this.Spacecategory}'`;
+        params.data.filters += `;classCode='${this.Spacecategory}'`;
       }
       if (this.keycode != "") {
-        params.data.filters += `;name contain '${this.keycode}' or localName contain '${this.keycode}'`;
+        params.data.filters += `;localId contain '${this.keycode}' or localName contain '${this.keycode}'`;
       }
 
       unSysZoneSpace(params, res => {
@@ -185,7 +203,7 @@ export default {
           this.$emit("refresh");
         });
       } else {
-        this.$message("请选择要关联的设备");
+        this.$message("请选择要关联的业务空间");
       }
     },
     //改变pagesize

+ 1 - 1
src/components/ledger/system/table/cenoteTable.vue

@@ -36,7 +36,7 @@
         <template slot="empty">
           <div style="height: 60%;transform: translateY(50%);">
             <i class="icon-wushuju iconfont"></i>
-            可前往“全部关系总览”中计算连通的其它竖井
+            可前往“全部关系总览”中,按系统内包含的设备与竖井关系计算
           </div>
         </template>
       </el-table>

+ 2 - 2
src/components/ledger/system/table/deviceTable.vue

@@ -16,7 +16,7 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column prop="EquipLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip
+        <el-table-column prop="localId" :label="`${inSpaceType}本地编码`" show-overflow-tooltip
                          min-width="100"></el-table-column>
         <el-table-column :label="`${inSpaceType}类型`" show-overflow-tooltip min-width="100">
           <template slot-scope="scope">
@@ -34,7 +34,7 @@
         <template slot="empty">
           <div style="height: 60%;transform: translateY(50%);">
             <i class="icon-wushuju iconfont"></i>
-            可前往“全部关系总览”中计算竖井内设备
+            可前往“全部关系总览”中计算系统内设备
           </div>
         </template>
       </el-table>

+ 71 - 34
src/components/ledger/system/table/spaceTable.vue

@@ -2,45 +2,82 @@
   <div id="eqInSp">
     <el-row>
       <el-button type="primary" @click="add">添加{{ inSpaceType }}</el-button>
-      <el-tooltip class="item" effect="dark" content="可前往“全部关系总览”中,按系统内包含的设备与空间关系计算" placement="right">
+      <el-tooltip
+        class="item"
+        effect="dark"
+        content="可前往“全部关系总览”中,按系统内包含的设备与业务空间关系计算"
+        placement="right"
+      >
         <el-button>按系统内设备与业务空间关系计算</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-column :label="`${inSpaceType}名称`" show-overflow-tooltip min-width="100">
+      <el-table
+        :data="tableData"
+        style="width: 100%"
+        height="100%"
+        v-loading="loading"
+        :header-cell-style="headerStyle"
+      >
+        <el-table-column
+          :label="`${inSpaceType}名称`"
+          show-overflow-tooltip
+          min-width="100"
+        >
           <template slot-scope="scope">
-            <div>{{ scope.row.localName || scope.row.name || '' }}</div>
+            <div>{{ scope.row.localName || scope.row.name || "" }}</div>
           </template>
         </el-table-column>
-        <el-table-column prop="localId" :label="`${inSpaceType}本地编码`" show-overflow-tooltip
-                         min-width="100"></el-table-column>
-        <el-table-column :label="`${inSpaceType}类型`" show-overflow-tooltip min-width="100">
+        <el-table-column
+          prop="localId"
+          :label="`${inSpaceType}本地编码`"
+          show-overflow-tooltip
+          min-width="100"
+        ></el-table-column>
+        <el-table-column
+          :label="`${inSpaceType}类型`"
+          show-overflow-tooltip
+          min-width="100"
+        >
           <template slot-scope="scope">
             <div>{{ spaceType[scope.row.classCode] }}</div>
           </template>
         </el-table-column>
         <el-table-column prop="action" label="操作" min-width="100">
           <template slot-scope="scope">
-            <el-tooltip class="item" effect="dark" content="删除关系" placement="left">
-              <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain
-                         icon="el-icon-delete"></el-button>
+            <el-tooltip
+              class="item"
+              effect="dark"
+              content="删除关系"
+              placement="left"
+            >
+              <el-button
+                size="mini"
+                @click="handleDelete(scope.$index, scope.row)"
+                type="danger"
+                plain
+                icon="el-icon-delete"
+              ></el-button>
             </el-tooltip>
           </template>
         </el-table-column>
         <template slot="empty">
-          <div style="height: 60%;transform: translateY(50%);">
+          <div style="height: 60%; transform: translateY(50%)">
             <i class="icon-wushuju iconfont"></i>
-            可前往“全部关系总览”中计算竖井内系统
+            可前往“全部关系总览”中按系统内包含的设备与业务空间关系计算
           </div>
         </template>
       </el-table>
     </div>
     <!-- 添加空间弹窗 -->
-    <addSpaceDialog :dialogVisible.sync="dialogVisible" ref="addSpaceDialog" @refresh="refresh" :params="params"
-                    :spaceType="spaceType"
-                    :floorType="floorType"></addSpaceDialog>
+    <addSpaceDialog
+      :dialogVisible.sync="dialogVisible"
+      ref="addSpaceDialog"
+      @refresh="refresh"
+      :params="params"
+      :spaceType="spaceType"
+      :floorType="floorType"
+    ></addSpaceDialog>
   </div>
 </template>
 
@@ -51,10 +88,10 @@ import addSpaceDialog from "@/components/ledger/system/dialog/addSpaceDialog";
 
 export default {
   components: {
-    addSpaceDialog
+    addSpaceDialog,
   },
   computed: {
-    ...mapGetters("layout", ["projectId"])
+    ...mapGetters("layout", ["projectId"]),
   },
   data() {
     return {
@@ -63,17 +100,17 @@ export default {
       headerStyle: {
         backgroundColor: "#e1e4e5",
         color: "#2b2b2b",
-        lineHeight: "30px"
+        lineHeight: "30px",
       }, // 列表样式
       loading: false, // loading
-      tableData: [] //列表数据
+      tableData: [], //列表数据
     };
   },
   props: {
     params: Object,
     type: String,
     spaceType: Object,
-    floorType: {}
+    floorType: {},
   },
   created() {
     this.getTableData();
@@ -85,11 +122,11 @@ export default {
         filters: `id='${this.params.SysID}'`,
         cascade: [
           {
-            name: "zoneSpaceBaseTableList"
-          }
-        ]
+            name: "zoneSpaceBaseTableList",
+          },
+        ],
       };
-      queryLinkSys(params, res => {
+      queryLinkSys(params, (res) => {
         this.tableData = res.content[0].zoneSpaceBaseTableList || [];
       });
     },
@@ -98,17 +135,17 @@ export default {
       this.$confirm("确认删除该关系?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning"
+        type: "warning",
       })
         .then(() => {
           let params = {
             data: [
               {
                 sysId: this.params.SysID,
-                spaceId: row.id
-              }
+                spaceId: row.id,
+              },
             ],
-            type: row.classCode
+            type: row.classCode,
           };
           this.deleteSyInSh(params);
         })
@@ -118,7 +155,7 @@ export default {
     },
     // 删除系统所在竖井关系
     deleteSyInSh(params) {
-      spaceInSysUnlink(params, res => {
+      spaceInSysUnlink(params, (res) => {
         this.$message.success("删除成功");
         this.getTableData();
       });
@@ -140,14 +177,14 @@ export default {
     //刷新
     refresh() {
       this.dialogVisible = false;
-      this.getTableData()
-    }
+      this.getTableData();
+    },
   },
   watch: {
     type() {
       // this.getTableData()
-    }
-  }
+    },
+  },
 };
 </script>
 <style lang="less" scoped>

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

@@ -50,6 +50,7 @@
               style="margin-left:10px;"
               v-model="form.floorNum"
               :min="1"
+              :max="999"
               :disabled="form.floorTypeVal == 'RF'"
               @change="handleChange"
             ></el-input-number>
@@ -196,7 +197,7 @@
             ProjectId: this.projectId,
             ReplaceReason: null,
             Size: this.form.file.size,
-            UserName: this.userInfo.username,
+            UserName: this.userInfo.userName,
             UserId: this.userInfo.userId
           };
           request.modelFileUpload(data, res => {

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

@@ -11,7 +11,7 @@
           class="demo-ruleForm"
         >
           <el-form-item label="文件夹名称" prop="name">
-            <el-input v-model="ruleForm.name"  @keyup.enter.native="addFolder" focus></el-input>
+            <el-input v-model.trim="ruleForm.name"  @keyup.enter.native="addFolder" focus></el-input>
           </el-form-item>
         </el-form>
       </div>

+ 2 - 2
src/components/model/file/changeFolderName.vue

@@ -16,7 +16,7 @@
           class="demo-ruleForm"
         >
           <el-form-item label="文件夹名称" prop="name">
-            <el-input v-model="ruleForm.name" @keyup.enter.native="changeFolder" focus></el-input>
+            <el-input v-model.trim="ruleForm.name" @keyup.enter.native="changeFolder" focus></el-input>
           </el-form-item>
         </el-form>
       </div>
@@ -66,7 +66,7 @@ export default {
               { Name: this.ruleForm.name, Id: this.currentFolderId },
               () => {
                 this.$message({
-                  message: "模型文件夹创建成功",
+                  message: "模型文件夹修改成功",
                   type: "success"
                 });
                 // 重新获取文件夹列表

+ 1 - 1
src/components/model/file/floorTable.vue

@@ -14,7 +14,7 @@
           <span style="margin-left: 10px">{{ scope.row.FloorName }}</span>
         </template>
       </el-table-column>
-      <el-table-column prop="Note" label="备注" width="240"></el-table-column>
+      <el-table-column prop="Note" label="备注" :show-overflow-tooltip="true" width="240"></el-table-column>
       <el-table-column label="版本号">
         <template slot-scope="scope">
           <span style="margin-right: 5px">{{ scope.row.Version }}</span>

+ 4 - 4
src/components/model/file/versionDialog.vue

@@ -11,12 +11,12 @@
           <el-divider v-if="Object.keys(versionData.createData).length">新增设备概要内容</el-divider>
           <p v-if="Object.keys(versionData.createData).length" style="marginBottom:10px;">
             于【{{ versionData.acceptTime }}】上传模型文件,新增设备实例如下:</p>
-          <p v-for="(item, key) in versionData.createData" :key="'C'+key">【{{ mapType[key] }}】:【{{ item.length }}】个</p>
+          <p v-for="(item, key) in versionData.createData" :key="'C'+key">【{{ mapType[key]? mapType[key]: key }}】:【{{ item.length }}】个</p>
           <!-- 删除设备概要内容 -->
           <el-divider v-if="Object.keys(versionData.deleteData).length">删除设备概要内容</el-divider>
           <p v-if="Object.keys(versionData.deleteData).length" style="marginBottom:10px;">
             于【{{ versionData.acceptTime }}】上传模型文件,删除设备实例如下:</p>
-          <p v-for="(item, key) in versionData.deleteData" :key="'D'+key">【{{ mapType[key] }}】:【{{ item.length }}】个</p>
+          <p v-for="(item, key) in versionData.deleteData" :key="'D'+key">【{{ mapType[key]? mapType[key]: key }}】:【{{ item.length }}】个</p>
           <!-- 土建设备概要内容 -->
           <el-divider v-if="versionData.buildList.length">土建设备概要内容</el-divider>
           <p v-if="versionData.buildList.length" style="marginBottom:10px;">
@@ -30,7 +30,7 @@
           <!-- 新增设备 -->
           <el-divider v-if="Object.keys(versionData.createData).length">新增设备</el-divider>
           <div v-for="(item, key) in versionData.createData" :key="'CL'+key">
-            <p>【{{ mapType[key] }}】</p>
+            <p>【{{ mapType[key]? mapType[key]: key }}】</p>
             <p v-for="(obj, i) in item" :key="obj.Id">
               【{{ i + 1 }}】、建筑:【{{ obj.BuildingName || "无" }}】;楼层:【{{
                 obj.FloorName || "无"
@@ -41,7 +41,7 @@
           <!-- 删除设备 -->
           <el-divider v-if="Object.keys(versionData.deleteData).length">删除设备</el-divider>
           <div v-for="(item, key) in versionData.deleteData" :key="'DL'+key">
-            <p>【{{ mapType[key] }}】</p>
+            <p>【{{ mapType[key]? mapType[key]: key }}】</p>
             <p v-for="(obj, i) in item" :key="obj.Id">
               【{{ i + 1 }}】、建筑:【{{ obj.BuildingName || "无" }}】;楼层:【{{
                 obj.FloorName || "无"

+ 1 - 1
src/components/point/dynamicdata/delRelationDialog.vue

@@ -364,7 +364,7 @@ export default {
                   Data.forEach(t => {
                     if (t.id == item.FloorID) {
                       item.ObjectLocalName = t.localName;
-                      item.ObjectSequenceID = t.floorSequenceId;
+                      item.ObjectSequenceID = t.floorSequenceID;
                       item.BuildLocalName = t.building ? t.building.localName : '';
                     }
                   })

+ 1 - 1
src/components/point/dynamicdata/floorRules.vue

@@ -235,7 +235,7 @@ export default {
                   } else if (t.localName || t.id) {
                     item.ObjectLocalName = t.localName || t.id;
                   }
-                  item.ObjectSequenceID = t.floorSequenceId;
+                  item.ObjectSequenceID = t.floorSequenceID;
                   item.BuildLocalName = t.building ? t.building.localName : '';
                 }
               })

+ 26 - 67
src/components/ready/buildfloor/addBuild.vue

@@ -19,76 +19,50 @@
         <div
           :key="item.InfoPointCode"
           v-for="item in val"
-          :class="[{'upload-file':item.inputMode == 'F2' ||  item.Path === 'infos.pic'}]"
+          :class="[{'upload-file':item.dataType == 'ATTACHMENT' ||  item.Path === 'infos.pic'}]"
           style="width: 50%;display: inline-block">
 
           <el-form-item
-            :class="{FloorTypeSelect:item.inputMode == 'D1'||item.Unit}"
+            :class="{FloorTypeSelect:item.dataType == 'ENUM'||item.Unit}"
             :label="item.InfoPointName"
             :prop="item.InfoPointCode"
             v-if="all||item.Visible">
             <el-input
-              v-if="item.inputMode == 'B1' || item.inputMode == 'B2'"
-              v-model="form[item.Path]"/>
+              :disabled="!item.editable"
+              v-if="item.dataType == 'STRING'"
+              v-model.trim="form[item.Path]"/>
 
             <el-input
-              v-else-if="item.inputMode == 'A1'||item.inputMode == 'A2'"
+              v-else-if="item.dataType == 'INTEGER' || item.dataType == 'DOUBLE'"
               type="number"
-              v-model="form[item.Path]">
+              v-model.trim="form[item.Path]">
               <template slot="append" v-if="item.Unit">{{ item.Unit }}</template>
             </el-input>
 
             <el-select
-              v-else-if="item.inputMode == 'D1' || item.inputMode == 'E2'"
+              v-else-if="item.dataType == 'ENUM' || item.dataType == 'BOOLEAN'"
               placeholder="请选择"
               v-model="form[item.Path]">
               <el-option :key="op.name" :label="op.name" :value="op.code" v-for="op in item.options"></el-option>
             </el-select>
 
             <el-select
-              v-else-if="item.inputMode == 'D2'"
+              v-else-if="item.dataType == 'MENUM'"
               placeholder="请选择"
               v-model="form[item.Path]"
               multiple
               collapse-tags>
               <el-option :key="op.name" :label="op.name" :value="op.code" v-for="op in item.options"></el-option>
             </el-select>
-
             <el-date-picker
-              v-else-if="item.inputMode == 'C6'"
-              v-model="form[item.Path]"
-              type="daterange"
-              value-format="yyyy-MM-dd"
-              range-separator="至"
-              start-placeholder="开始日期"
-              end-placeholder="结束日期"/>
-
-            <el-cascader
-              v-else-if="item.inputMode == 'D1L'"
-              placeholder="请选择"
-              :options="item.options"
+              v-else-if="item.dataType == 'DATETIME'"
               v-model="form[item.Path]"
-              :props="item.props"
-              filterable
-              :show-all-levels="false"
-              clearable
-              style="width: 200px"/>
-
-            <el-input
-              v-else-if="item.inputMode == 'L'||item.inputMode == 'L1'||item.inputMode == 'L2'||item.inputMode == 'M'"
-              v-model="form[item.Path]">
-              <template slot="append" v-if="item.Unit">{{ item.Unit }}</template>
-            </el-input>
-
-            <el-date-picker
-              v-else-if="item.inputMode == 'C5'" v-model="form[item.Path]"
               placeholder="选择日期"
-              value-format="yyyy-MM-dd"
               type="date">
             </el-date-picker>
 
             <uploadImgs
-              v-else-if="item.inputMode == 'F2'&& item.Path === 'infos.Pic'"
+              v-else-if="item.dataType == 'ATTACHMENT'&& item.Path === 'infos.Pic'"
               :readOnly="false"
               v-model="form[item.Path]"
               :keysArr="Array.isArray(buildData[item.Path]) ? buildData[item.Path]:[]"
@@ -97,7 +71,7 @@
               @change="changeItem"/>
 
             <upload-files
-              v-else-if="item.inputMode == 'F2'"
+              v-else-if="item.dataType == 'ATTACHMENT'"
               v-model="form[item.Path]"
               :readOnly="false"
               :isShow="1"
@@ -106,8 +80,6 @@
               :context-key="item.Path"
               @change="changeItem"/>
 
-            <el-input disabled title="暂不支持" v-else v-model="form[item.Path]"/>
-
           </el-form-item>
         </div>
       </template>
@@ -187,20 +159,20 @@ export default {
       //获取信息
       let buildData = data || {};  // string =>array key
       buildData = flattenKeys(buildData);
-      for (let key in this.buildMessage) {
-        let arr = this.buildMessage[key];
-        if (Array.isArray(arr)) {
-          let list = arr.filter(i => i.inputMode == 'D2' || i.inputMode == 'C6');
-          list.forEach(j => {
-            if (buildData.hasOwnProperty(j.Path)) {
-              if (!Array.isArray(buildData[j.Path])) {
-                buildData[j.Path] = buildData[j.Path].split(',');
-              }
-            }
-
-          })
-        }
-      }
+      // for (let key in this.buildMessage) {
+      //   let arr = this.buildMessage[key];
+      //   if (Array.isArray(arr)) {
+      //     let list = arr.filter(i => i.dataType == 'MENUM' || i.dataType == 'DATETIME');
+      //     list.forEach(j => {
+      //       if (buildData.hasOwnProperty(j.Path)) {
+      //         if (!Array.isArray(buildData[j.Path])) {
+      //           buildData[j.Path] = buildData[j.Path].split(',');
+      //         }
+      //       }
+      //
+      //     })
+      //   }
+      // }
       this.buildData = buildData;
       this.timeoutSetVal()
       this.buildDialogVis = true
@@ -223,19 +195,6 @@ export default {
       this.$refs[formName].validate((valid) => {
         if (valid) {
           this.buildDisabled = true
-          for (let key in this.buildMessage) {
-            let arr = this.buildMessage[key];
-            if (Array.isArray(arr)) {
-              let list = arr.filter(i => i.inputMode == 'D2' || i.inputMode == 'C6');
-              list.forEach(j => {
-                if (this.form.hasOwnProperty(j.Path)) {
-                  if (Array.isArray(this.form[j.Path])) {
-                    this.form[j.Path] = this.form[j.Path].join(',');
-                  }
-                }
-              })
-            }
-          }
           this.$emit('handleBuild', this.form)
           setTimeout(() => {
             this.buildDisabled = false

+ 5 - 13
src/components/ready/buildfloor/addConnectivity.vue

@@ -48,24 +48,16 @@ export default {
         floorId: this.floor.id,
         floorOtherIdList: []
       }
-      let flag = false
       arr.map(t => {
         if (t[1]) {
           param.floorOtherIdList.push(t[1])
-          flag = true
-        } else {
-          flag = false
         }
       })
-      if (flag) {
-        createRelationInFloor(param, res => {
-          this.connectDialogVis = false;
-          this.$message.success('关联成功');
-          this.$emit('refresh')
-        })
-      } else {
-        this.connectDialogVis = false;
-      }
+			createRelationInFloor(param, res => {
+				this.connectDialogVis = false;
+				this.$message.success('关联成功');
+				this.$emit('refresh')
+			})
     }
   }
 }

+ 2 - 2
src/components/ready/buildfloor/buildfloorCascader.vue

@@ -12,7 +12,7 @@ export default {
       props: {
         multiple: true,
         value: 'id',
-        label: 'name',
+        label: 'localName',
         children: 'floor'
       },
       options: []
@@ -30,7 +30,7 @@ export default {
       let param = {
         cascade: [
           // { Name: "floor", Orders: "FloorSequenceID desc" }
-          {name: "floor", orders: "floorSequenceId desc"}
+          {name: "floor", orders: "floorSequenceID desc"}
         ],
         // Orders: "BuildLocalName asc",
         pageNumber: 1,

+ 141 - 91
src/components/ready/buildfloor/formItems.vue

@@ -1,128 +1,175 @@
 <template>
   <div id="inforsPoint">
-    <el-form ref="ruleForm" :model="form" label-width="150px" :rules="rules" :inline="true" :label-position="'right'">
-      <div v-for="item in InforsList" :key="item.infoPointCode" style="width:50%;display: inline-block">
+    <el-form
+      ref="ruleForm"
+      :model="form"
+      label-width="150px"
+      :rules="rules"
+      :inline="true"
+      :label-position="'right'"
+    >
+      <div
+        v-for="item in InforsList"
+        :key="item.infoPointCode"
+        style="width: 50%; display: inline-block"
+      >
         <el-form-item
           :label="item.name"
           :prop="item.code"
-          v-if="all||item.visible"
-          :class="{FloorTypeSelect:item.inputMode == 'D1'||item.unit}">
-
+          v-if="all || item.visible"
+          :class="{ FloorTypeSelect: item.dataType == 'ENUM' || item.unit }"
+        >
           <el-input
-            v-model="form[item.path]"
-            v-if="item.infoPointCode == 'bimLocation' || item.infoPointCode =='modelId'"
-            disabled/>
+            v-model.trim="form[item.path]"
+            v-if="
+              item.infoPointCode == 'bimLocation' ||
+              item.infoPointCode == 'modelId'
+            "
+            disabled
+          />
 
           <!--二维码相关-->
-          <span v-else-if="item.infoPointCode == 'DefaultQRCode' ">
-            <el-input v-if="!form[item.path]" v-model="form[item.path]" disabled/>
+          <span v-else-if="item.infoPointCode == 'DefaultQRCode'">
+            <el-input
+              v-if="!form[item.path]"
+              v-model.trim="form[item.path]"
+              disabled
+            />
             <el-popover v-else placement="right" width="210" trigger="click">
-              <div style="overflow:hidden;">
+              <div style="overflow: hidden">
                 <img
-                  style="width:200px;height:200px;"
-                  :src="'/image-service/common/file_get/'+ form[item.path] +'?systemId=dataPlatform'"
-                  alt="二维码">
+                  style="width: 200px; height: 200px"
+                  :src="
+                    '/image-service/common/file_get/' +
+                    form[item.path] +
+                    '?systemId=dataPlatform'
+                  "
+                  alt="二维码"
+                />
               </div>
               <el-button slot="reference" type="text">点击查看</el-button>
             </el-popover>
           </span>
 
-          <span v-else-if="item.infoPointCode == 'QRCodePic' ">
-            <el-input v-if="!form[item.path]" v-model="form[item.path]" disabled/>
+          <span v-else-if="item.infoPointCode == 'QRCodePic'">
+            <el-input
+              v-if="!form[item.path]"
+              v-model.trim="form[item.path]"
+              disabled
+            />
             <el-popover v-else placement="right" width="210" trigger="click">
-              <div style="overflow:hidden;">
+              <div style="overflow: hidden">
                 <img
-                  style="width:200px;height:200px;"
-                  :src="'/image-service/common/file_get/'+ form[item.path] +'?systemId=dataPlatform'"
-                  alt="二维码">
+                  style="width: 200px; height: 200px"
+                  :src="
+                    '/image-service/common/file_get/' +
+                    form[item.path] +
+                    '?systemId=dataPlatform'
+                  "
+                  alt="二维码"
+                />
               </div>
               <el-button slot="reference" type="text">点击查看</el-button>
             </el-popover>
           </span>
 
           <!--/二维码相关-->
-          <span v-else-if="item.inputMode == 'B1'">
-            <el-input v-model="form[item.path]"
-                      :placeholder="(item.inputMode === 'B1' && item.path==='localId') ? '填写示例:F1、B1?':'' "/>
-              <div v-if="item.inputMode === 'B1' && item.path==='localId' && isShowTitle"
-                   style="color: gray;font-size: 12px">
-                用于楼层平面图切换
-              </div>
+          <span v-else-if="item.dataType == 'STRING'">
+            <el-input
+              v-model.trim="form[item.path]"
+              :disabled="!item.editable"
+              :placeholder="
+                item.dataType == 'STRING' && item.path === 'localId'
+                  ? '填写示例:F1、B1?'
+                  : ''
+              "
+            />
+            <div
+              v-if="
+                item.dataType == 'STRING' &&
+                item.path === 'localId' &&
+                isShowTitle
+              "
+              style="color: gray; font-size: 12px"
+            >
+              用于楼层平面图切换
+            </div>
           </span>
 
-          <el-input v-model="form[item.path]" v-else-if="item.inputMode == 'A1'||item.inputMode == 'A2'" type="number">
+          <el-input-number
+            v-model.trim="form[item.path]"
+            :controls="false"
+            style="text-align: right;"
+            v-else-if="item.dataType == 'INTEGER' || item.dataType == 'DOUBLE'"
+          >
             <template slot="append" v-if="item.unit">{{ item.unit }}</template>
-          </el-input>
+          </el-input-number>
 
-          <el-select v-model="form[item.path]" placeholder="请选择" v-else-if="item.inputMode == 'D1'">
-            <el-option v-for="op in item.options" :key="op.code" :label="op.name" :value="op.code"></el-option>
-          </el-select>
-
-          <el-cascader
-            v-else-if="item.inputMode == 'D1L'"
-            placeholder="请选择"
-            :options="item.options"
+          <el-select
             v-model="form[item.path]"
-            :props="item.props"
-            filterable
-            :show-all-levels="false"
-            clearable
-            style="width: 200px"/>
-
+            placeholder="请选择"
+            v-else-if="item.dataType == 'ENUM'"
+          >
+            <el-option
+              v-for="op in item.options"
+              :key="op.code"
+              :label="op.name"
+              :value="op.code"
+            ></el-option>
+          </el-select>
           <el-input
-            v-else-if="item.inputMode == 'L'||item.inputMode == 'L1'||item.inputMode == 'L2'||item.inputMode == 'M'"
-            v-model="form[item.path]">
-            <template slot="append" v-if="item.unit">{{ item.unit }}</template>
-          </el-input>
-          <el-input v-model="form[item.path]" v-else disabled title="暂不支持" :placeholder="item.inputMode?'':'字典无输入类型'"></el-input>
+            v-model.trim="form[item.path]"
+            v-else
+            :disabled="!item.editable"
+            :placeholder="item.dataType ? '' : '字典无输入类型'"
+          ></el-input>
         </el-form-item>
       </div>
     </el-form>
   </div>
 </template>
 <script>
-import {getDataDictionary} from "@/api/dict";
+import { getDataDictionary } from "@/api/dict";
+import rules from "../../../api/fm/rules";
 
 export default {
   props: {
     type: {
-      default: 'floor'
-    }
+      default: "floor",
+    },
   },
   data() {
+
     let validateId = (rule, value, callback) => {
+      console.log('localId', rule, value, callback)
       if (!value) {
-        this.isShowTitle = false
-        return callback(new Error('请输入楼层本地编码'));
+        this.isShowTitle = false;
+        return callback(new Error("请输入楼层本地编码"));
       } else {
-        this.isShowTitle = true
-        callback()
+        this.isShowTitle = true;
+        callback();
       }
-    }
-    // }
+    };
     return {
       form: {},
       isShowTitle: true,
       InforsList: [],
       all: true, // 默认显示全部
       rules: {
-        "localId": [
-          {validator: validateId, trigger: 'blur', "required": true}
+        localId: [{ validator: validateId, trigger: "blur", required: true }],
+        localName: [
+          { required: true, message: "请输入楼层本地名称", trigger: "blur" },
         ],
-        "localName": [
-          {"required": true, "message": "请输入楼层本地名称", "trigger": "blur"}
+        floorSequenceID: [
+          { required: true, message: "请输入楼层顺序号",  trigger: "blur" },
         ],
-        "floorSequenceID": [
-          {"required": true, "message": "请输入楼层顺序号", "trigger": "blur"}
-        ]
-      }
+      },
     };
   },
 
   created() {
-    this.getInforsPoint()
-  }
-  ,
+    this.getInforsPoint();
+  },
   methods: {
     getInforsPoint() {
       let params = {
@@ -134,44 +181,44 @@ export default {
       };
       getDataDictionary(params, res => {
         let arr = res.content.map(item => {
-          if ((item.inputMode === 'D1' || item.inputMode === 'D2' || item.inputMode === 'E2' || item.inputMode === 'D1L') && item.dataSource) {
-            // item.options = JSON.parse(item.dataSource)
+          const category = ['ENUM', 'MENUM', 'BOOLEAN']
+          if (item.category == 'STATIC' && category.includes(item.dataType) && item.dataSource) {
             item.options = item.dataSource
-            if (item.options[0] && item.options[0].content) {
+            if (item.options[0]) {
               item.props = {
-                value: 'code',
-                label: 'name',
-                children: 'content',
-                checkStrictly: true
-              }
+                value: "code",
+                label: "name",
+                children: "content",
+                checkStrictly: true,
+              };
             }
           }
-          switch (item.code) { //过滤掉待删除的
-            case 'floorIdentity':
-            case 'relatedSchedule':
-            case 'outPeopleFlow':
-            case 'inPeopleFlow':
-            case 'exsitPeopleNum':
+          switch (
+            item.code //过滤掉待删除的
+            ) {
+            case "floorIdentity":
+            case "relatedSchedule":
+            case "outPeopleFlow":
+            case "inPeopleFlow":
+            case "exsitPeopleNum":
               break;
             default:
-              return item
+              return item;
           }
-        })
-        //手动删除掉数据字典中不存在的字段,等待后台同步
-        this.InforsList = arr.filter(t => t && t.code != 'FloorQRCode')
-      })
+        });
+        this.InforsList = arr;
+      });
     },
     submitForm(call) {
       this.$refs.ruleForm.validate((valid) => {
         if (valid) {
-          call()
+          call();
         } else {
           return false;
         }
       });
     },
-
-  }
+  },
 };
 </script>
 <style lang="scss" scoped>
@@ -181,13 +228,16 @@ export default {
       font-size: 12px;
     }
   }
+  /deep/ .el-input-number .el-input__inner {
+    text-align: left;
+  }
 
   /deep/ .FloorTypeSelect .el-form-item__content {
     width: 200px;
   }
 
   /deep/ .el-input--small {
-    width: 200px
+    width: 200px;
   }
 }
 </style>

+ 305 - 302
src/components/relation/overview/CardList.vue

@@ -4,8 +4,8 @@
       :key="index"
       v-for="(item,index) in content"
     >
-      <p class="slave-relation-title">{{item.graphTypeName}}
-      <span>(主要连接对象按照标准字典显示)</span>
+      <p class="slave-relation-title">{{ item.graphTypeName }}
+        <span>(主要连接对象按照标准字典显示)</span>
       </p>
       <section
         :key="child.graphTypeId"
@@ -15,10 +15,11 @@
         <p class="relation-text">
           <span class="iconfont icon-juxing"></span>
           <span @click="toDetail(child)" style="cursor:pointer;">
-            {{child.graphTypeName}}
+            {{ child.graphTypeName }}
             <i class="icon-zuzhiguanxi iconfont"/></span>
-          <span class="pic-code">图类型编码:{{child.graphTypeCode}}</span>
+          <span class="pic-code">图类型编码:{{ child.graphTypeCode }}</span>
           <el-tooltip
+            v-if="child.Note"
             :content="child.Note"
             placement="top">
             <i
@@ -48,16 +49,17 @@
                   :content="relation.relationTypeName"
                   placement="top"
                 >
-                  <p class="relation-title reset-test reset-title">{{relation.relationTypeName}}</p>
+                  <p class="relation-title reset-test reset-title">{{ relation.relationTypeName }}</p>
                 </el-tooltip>
                 <el-tooltip
                   :content="relation.relationTypeCode"
                   placement="top"
                 >
-                  <p class="asc reset-title reset-test">边类型编码:{{relation.relationTypeCode}}</p>
+                  <p class="asc reset-title reset-test">边类型编码:{{ relation.relationTypeCode }}</p>
                 </el-tooltip>
                 <p class="relation-title-icon reset-test fr">
                   <el-tooltip
+                    v-if="relation.note"
                     :content="relation.note"
                     placement="top"
                     style="z-index: 3;position:relative;"
@@ -75,7 +77,7 @@
                         :content="relation.conneObject"
                         placement="top"
                       >
-                        <p class="group reset-title">{{relation.conneObject}}</p>
+                        <p class="group reset-title">{{ relation.conneObject }}</p>
                       </el-tooltip>
                     </div>
                   </el-col>
@@ -87,7 +89,7 @@
                   <el-col :span="9">
                     <div class="grid-content ">
                       <p class="line-number">连接数量</p>
-                      <p :class="relation.count > 0? 'line-number-show' :'line-number-hide'">{{relation.count}}</p>
+                      <p :class="relation.count > 0? 'line-number-show' :'line-number-hide'">{{ relation.count }}</p>
 
                     </div>
                   </el-col>
@@ -98,9 +100,9 @@
                   <span v-show="relation.computationalState === 3">关系计算中...</span>
                   <span v-show="relation.computationalState === 5">计算失败</span>
                   <span
-                    v-show="relation.computationalState !== 3  && relation.computingTime">最后一次计算时间 {{relation.computingTime}}</span>
+                    v-show="relation.computationalState !== 3  && relation.computingTime">最后一次计算时间 {{ relation.computingTime }}</span>
                   <el-tooltip
-                    content="启动计算"
+                    :content="relation.computationalState === 2 ? '关系变更,请重新计算':'启动计算'"
                     placement="top"
                   >
                     <el-badge
@@ -109,7 +111,7 @@
                     >
                       <el-button
                         @click="computed(relation)"
-                        :disabled="!relation.source && !relation.automatic"
+                        :disabled="!relation.source && !relation.automatic "
                         circle
                         type="primary"
                         plain
@@ -170,359 +172,360 @@
       :TableVisibleMoreLoading="TableVisibleMoreLoading"
       @openComputed="openComputed"
       @RelationType="RelationType"
+      @calcSpecialUpdate="calcSpecialUpdate"
     />
   </div>
 
 </template>
 
 <script>
-  import RelationMaintain from './Modal/RelationMaintain'
-
-  export default {
-    name: "cardList",
-    props: {
-      content: Array,
-      source: Array,
-      TableVisibleMoreLoading: Boolean,
-      // cardDisabled: Boolean
+import RelationMaintain from './Modal/RelationMaintain'
+
+export default {
+  name: "cardList",
+  props: {
+    content: Array,
+    source: Array,
+    TableVisibleMoreLoading: Boolean,
+    // cardDisabled: Boolean
+  },
+  data() {
+    return {
+      values: {
+        title: '关系维护',
+        cancel: '取消',
+        confirm: '确定',
+        back: '返回',
+        preservation: '保存',
+        promptly: '立即计算',
+        placeholder: '请选择',
+        download: '下载模板(含数据)',
+        done: '完成',
+        underDesign: '高级配置页面正在设计中。。。',
+        autoComputed: '根据现有数据自动计算',
+        existComputed: '根据现有数据自动计算',
+        existTitle: '计算方向使用的源端和末端如下:',
+        originEquipment: '源端设备类:',
+        endEquipment: '末端设备类:',
+        device: '', //提示引导内容
+        tips: '', //请前往以下功能页面维护
+        optionTips: '', //请下载最新最新 xxxx 数据进行手动维护
+        currentNum: '当前关系数量:',
+        lastTime: '', //最后更新时间为
+        uploadTxt: '将Excel文件拖到此处,或<em>单击上传Excel文件<em>',
+        uploadTips: '上传的Excel数据将完全覆盖当前关系表(关系表先前数据不会保留)',
+        inHand: '数据文件处理中...',
+        dataFailed: '数据文件验证失败',
+        allUpdateSuccess: 'xxxx全部更新成功',
+        portionUpdateSuccess: ' xxxx关系部分更新成功',
+        downloadFile: ' 下载报告文件',
+        equipmentSetting: ''
+      },
+      isComputed: {}, // 当前要计算的对象
+      ManualMaintenance: {},//手动编辑对象
+    }
+  },
+  created() {
+  },
+  computed: {},
+
+  methods: {
+    explain() {
+      // alert('explain click')
     },
-    data() {
-      return {
-        values: {
-          title: '关系维护',
-          cancel: '取消',
-          confirm: '确定',
-          back: '返回',
-          preservation:'保存',
-          promptly: '立即计算',
-          placeholder: '请选择',
-          download: '下载模板(含数据)',
-          done: '完成',
-          underDesign: '高级配置页面正在设计中。。。',
-          autoComputed: '根据现有数据自动计算',
-          existComputed: '根据现有数据自动计算',
-          existTitle: '计算方向使用的源端和末端如下:',
-          originEquipment: '源端设备类:',
-          endEquipment: '末端设备类:',
-          device: '', //提示引导内容
-          tips: '', //请前往以下功能页面维护
-          optionTips: '', //请下载最新最新 xxxx 数据进行手动维护
-          currentNum: '当前关系数量:',
-          lastTime: '', //最后更新时间为
-          uploadTxt: '将Excel文件拖到此处,或<em>单击上传Excel文件<em>',
-          uploadTips: '上传的Excel数据将完全覆盖当前关系表(关系表先前数据不会保留)',
-          inHand: '数据文件处理中...',
-          dataFailed: '数据文件验证失败',
-          allUpdateSuccess: 'xxxx全部更新成功',
-          portionUpdateSuccess: ' xxxx关系部分更新成功',
-          downloadFile: ' 下载报告文件',
-          equipmentSetting: ''
-        },
-        isComputed: {}, // 当前要计算的对象
-        ManualMaintenance: {},//手动编辑对象
-      }
+    RelationType() {
+      // this.cardDisabled = true
+      this.$emit('RelationType', this.isComputed.relationType, this.isComputed.zoneType, this.isComputed)
     },
-    created() {
+    calcSpecialUpdate(params) {
+        this.$emit("calcSpecialUpdate", params, this.isComputed);
     },
-    computed: {},
-
-    methods: {
-      explain() {
-        // alert('explain click')
-      },
-      RelationType() {
-        // this.cardDisabled = true
-        this.$emit('RelationType', this.isComputed.relationType, this.isComputed.zoneType)
-
-      },
-      computed(relation) {
-        this.isComputed = relation // 当前要计算的对象
-        if (relation.relationType) {
-          this.$emit('calcSpecial', relation)
-          if (relation.source) {
-            this.values.existComputed = `根据现有数据自动计算 <${relation.relationTypeName}>`
-            this.$refs.maintain.dialogTableVisibleMore = true
-            this.$refs.maintain.showCascader(relation)
-            this.$refs.maintain.handleSourceQuery()
+    computed(relation) {
+      this.isComputed = relation // 当前要计算的对象
+      if (relation.relationType) {
+        this.$emit('calcSpecial', relation)
+        if (relation.source) {
+          this.values.existComputed = `根据现有数据自动计算 <${ relation.relationTypeName }>`
+          this.$refs.maintain.dialogTableVisibleMore = true
+          this.$refs.maintain.showCascader(relation)
+          this.$refs.maintain.handleSourceQuery()
 
-          } else {
-            this.values.autoComputed = `根据现有数据自动计算 <${relation.relationTypeName}>`
-            this.$refs.maintain.dialogTableVisible = true
-
-
-          }
         } else {
-          this.$message.warning("设计中")
-          return false
+          this.values.autoComputed = `根据现有数据自动计算 <${ relation.relationTypeName }>`
+          this.$refs.maintain.dialogTableVisible = true
         }
-      },
-      equipment(relation) { //配置源端末端
-        this.values.equipmentSetting = `${relation.relationTypeName} 源末端关系设置`
-        this.$refs.maintain.dialogEquipmentOpen(relation)
-        this.$refs.maintain.handleSourceQuery()
-      },
-      manual(relation) {
-        let {manual, prompting, relationTypeName, computingTime} = relation;
-        let device = prompting && prompting.split(','),
-          tips = `请前往以下功能页面维护 <${relationTypeName}>`,
-          optionTips = `请下载当前最新 <${relationTypeName}> 数据进行手动维护`,
-          lastTime = `最后更新时间为 ${computingTime ? computingTime : ''}`
-
-        if (manual === 2) {
-          this.values = {...this.values, device, tips}
-          this.$refs.maintain.dialogManualTip = true
-        }
-        if (manual === 3) {
-          // if (relation.RelManualType) {
-          if (relation.relationType) {
-            this.values = {...this.values, optionTips, lastTime}
-            // this.$refs.maintain.dialogManualOption = true //导出excel 弹窗
-            this.$router.push({
-              path:"relationShip"
-            })
-            console.log(relation,'relation')
-          localStorage.setItem('RelManualType',relation.relManualType)
-          localStorage.setItem('RelationTypeName',relation.relationTypeName)
-          localStorage.setItem('RelationType',relation.relationType)
-          localStorage.setItem('ZoneType',relation.zoneType ? relation.zoneType : '')
-          localStorage.setItem('MainObject',relation.mainObject)
+      } else {
+        this.$message.warning("设计中")
+        return false
+      }
+    },
+    equipment(relation) { //配置源端末端
+      this.values.equipmentSetting = `${ relation.relationTypeName } 源末端关系设置`
+      this.$refs.maintain.dialogEquipmentOpen(relation)
+      this.$refs.maintain.handleSourceQuery()
+    },
+    manual(relation) {
+      let { manual, prompting, relationTypeName, computingTime } = relation;
+      let device = prompting && prompting.split(','),
+        tips = `请前往以下功能页面维护 <${ relationTypeName }>`,
+        optionTips = `请下载当前最新 <${ relationTypeName }> 数据进行手动维护`,
+        lastTime = `最后更新时间为 ${ computingTime ? computingTime : '' }`
+
+      if (manual === 2) {
+        this.values = { ...this.values, device, tips }
+        this.$refs.maintain.dialogManualTip = true
+      }
+      if (manual === 3) {
+        // if (relation.RelManualType) {
+        if (relation.relationType) {
+          this.values = { ...this.values, optionTips, lastTime }
+          // this.$refs.maintain.dialogManualOption = true //导出excel 弹窗
+          this.$router.push({
+            path: "relationShip"
+          })
+          console.log(relation, 'relation')
+          localStorage.setItem('RelManualType', relation.relManualType)
+          localStorage.setItem('RelationTypeName', relation.relationTypeName)
+          localStorage.setItem('RelationType', relation.relationType)
+          localStorage.setItem('ZoneType', relation.zoneType ? relation.zoneType : '')
+          localStorage.setItem('MainObject', relation.mainObject)
           localStorage.setItem('FromObject', relation.fromObject)
           localStorage.setItem('count', relation.count)
           localStorage.setItem('ComputingTime', relation.computingTime ? relation.computingTime : '')
-          } else {
-            this.$message.warning("设计中")
-            return false
-          }
+        } else {
+          this.$message.warning("设计中")
+          return false
         }
-        this.ManualMaintenance = relation
-      },
-
-      openComputed(result) {
-        this.$emit('openComputed', result)
-      },
-
-      //空间连接关系详情
-      toDetail(detail){
-        return
-        this.$router.push({
-          name: 'relationDetail',
-          query: {
-            type: detail.graphTypeCode,
-            RelationTypeProjectList: detail.relationTypeProjectList
-          }
-        })
       }
+      this.ManualMaintenance = relation
     },
-    components: {RelationMaintain}
-  }
-</script>
 
-<style lang="less" scoped>
-  @color-text: #333;
-  @font-big: 600;
-  @font-small: 12px;
-  @font-code: #AAAAAA;
-  @pos-relative: relative;
-  @pos-absolute: absolute;
-  @pos-zero: 0;
-  @5px: 5px;
-
-  .slave-relation-title {
-    color: @font-code;
-    font-weight: 600;
-    border-bottom: 1px dashed @font-code;
-    padding-bottom: @5px;
-  }
-
-  .container {
-    @media (max-width: 1500px) {
-      .relation-title {
-        max-width: 160px;
-      }
-
-      .group {
-        white-space: normal !important;
-      }
-
-      .asc {
-        max-width: 108px;
-      }
-
-      .thread {
-        margin-left: 5px !important;
-      }
-
-      /deep/ .el-card__body {
-        padding: 18px !important;
-      }
-
-      .sm-button {
-        height: 30px;
-        width: 30px;
-        text-align: center;
-        padding: 0;
-      }
+    openComputed(result) {
+      this.$emit('openComputed', result)
+    },
 
+    //空间连接关系详情
+    toDetail(detail) {
+      return
+      this.$router.push({
+        name: 'relationDetail',
+        query: {
+          type: detail.graphTypeCode,
+          RelationTypeProjectList: detail.relationTypeProjectList
+        }
+      })
     }
+  },
+  components: { RelationMaintain }
+}
+</script>
 
-    .el-row {
-      margin-bottom: 20px;
-
-      &:last-child {
-        margin-bottom: 0;
-      }
+<style lang="less" scoped>
+@color-text: #333;
+@font-big: 600;
+@font-small: 12px;
+@font-code: #AAAAAA;
+@pos-relative: relative;
+@pos-absolute: absolute;
+@pos-zero: 0;
+@5px: 5px;
+
+.slave-relation-title {
+  color: @font-code;
+  font-weight: 600;
+  border-bottom: 1px dashed @font-code;
+  padding-bottom: @5px;
+}
+
+.container {
+  @media (max-width: 1500px) {
+    .relation-title {
+      max-width: 160px;
     }
 
-    .el-col {
-      border-radius: 4px;
+    .group {
+      white-space: normal !important;
     }
 
-    .grid-content {
-      border-radius: 4px;
-      min-height: 36px;
-
-      .thread {
-        border-left: 1px solid @font-code;
-        margin-left: 10px;
-        min-height: 36px;
-        margin-top: 6px;
-      }
+    .asc {
+      max-width: 108px;
     }
 
-    .row-bg {
-      padding: 10px 0;
-      background-color: #f9fafc;
+    .thread {
+      margin-left: 5px !important;
     }
 
-    .reset-title {
-      overflow: hidden;
-      white-space: nowrap;
-      text-overflow: ellipsis;
+    /deep/ .el-card__body {
+      padding: 18px !important;
     }
 
-    .reset-test {
-      float: left;
+    .sm-button {
+      height: 30px;
+      width: 30px;
       text-align: center;
-      height: 40px;
-      line-height: 40px;
+      padding: 0;
     }
 
-    .fr {
-      float: right;
-    }
+  }
 
-    .el-card {
-      margin: 10px 0;
-    }
+  .el-row {
+    margin-bottom: 20px;
 
-    .relation-text {
-      overflow: hidden;
-      margin-top: 10px;
-      /*text-indent: 10px;*/
-      margin-left: -3px;
-      font-weight: @font-big;
-
-      .pic-code {
-        font-size: @font-small;
-        color: @font-code;
-        margin-left: @5px;
-        font-weight: 400;
-      }
+    &:last-child {
+      margin-bottom: 0;
     }
+  }
 
-    .card {
-      position: @pos-relative;
+  .el-col {
+    border-radius: 4px;
+  }
 
-    }
+  .grid-content {
+    border-radius: 4px;
+    min-height: 36px;
 
-    .mask {
-      background: rgba(255, 255, 255, .6);
-      position: @pos-absolute;
-      top: @pos-zero;
-      left: @pos-zero;
-      right: @pos-zero;
-      bottom: @pos-zero;
-      user-select: none;
-      z-index: 2
+    .thread {
+      border-left: 1px solid @font-code;
+      margin-left: 10px;
+      min-height: 36px;
+      margin-top: 6px;
     }
+  }
 
-    .relation-title {
-      font-size: 20px;
-      font-weight: @font-big;
-      margin-right: 10px;
-
-      .icon {
-        display: block;
-        float: right;
-        color: #555;
-        font-size: 18px;
-      }
-    }
+  .row-bg {
+    padding: 10px 0;
+    background-color: #f9fafc;
+  }
 
-    .relation-title-icon {
-      font-size: 20px;
-      font-weight: @font-big;
-      overflow: hidden;
+  .reset-title {
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+  }
 
-      .icon {
-        display: block;
-        float: right;
-        color: #555;
-        font-size: 18px;
-      }
-    }
+  .reset-test {
+    float: left;
+    text-align: center;
+    height: 40px;
+    line-height: 40px;
+  }
 
-    .asc {
-      font-size: @font-small;
-      color: @font-code;
-    }
+  .fr {
+    float: right;
+  }
 
-    .object {
-      font-size: @font-small;
-      color: @font-code;
-      font-weight: @font-big;
-    }
+  .el-card {
+    margin: 10px 0;
+  }
 
-    .group {
-      color: @color-text;
-      font-weight: @font-big;
-    }
+  .relation-text {
+    overflow: hidden;
+    margin-top: 10px;
+    /*text-indent: 10px;*/
+    margin-left: -3px;
+    font-weight: @font-big;
 
-    .line-number {
+    .pic-code {
       font-size: @font-small;
       color: @font-code;
-      font-weight: @font-big;
+      margin-left: @5px;
+      font-weight: 400;
     }
+  }
 
-    .line-number-show {
-      color: @color-text;
-      font-weight: @font-big;
-    }
+  .card {
+    position: @pos-relative;
 
-    .line-number-hide {
-      color: @font-code;
-      font-weight: @font-big;
+  }
+
+  .mask {
+    background: rgba(255, 255, 255, .6);
+    position: @pos-absolute;
+    top: @pos-zero;
+    left: @pos-zero;
+    right: @pos-zero;
+    bottom: @pos-zero;
+    user-select: none;
+    z-index: 2
+  }
+
+  .relation-title {
+    font-size: 20px;
+    font-weight: @font-big;
+    margin-right: 10px;
+
+    .icon {
+      display: block;
+      float: right;
+      color: #555;
+      font-size: 18px;
     }
+  }
 
+  .relation-title-icon {
+    font-size: 20px;
+    font-weight: @font-big;
+    overflow: hidden;
 
-    article {
-      overflow: hidden;
+    .icon {
+      display: block;
+      float: right;
+      color: #555;
+      font-size: 18px;
     }
+  }
 
-    .last-computed {
-      overflow: hidden;
-      color: @font-code;
+  .asc {
+    font-size: @font-small;
+    color: @font-code;
+  }
 
-      .float-right {
-        float: right;
-        margin-left: @5px;
-      }
+  .object {
+    font-size: @font-small;
+    color: @font-code;
+    font-weight: @font-big;
+  }
 
-      /deep/ .is-dot {
-        margin-top: 7px;
-        margin-right: @5px;
-      }
+  .group {
+    color: @color-text;
+    font-weight: @font-big;
+  }
+
+  .line-number {
+    font-size: @font-small;
+    color: @font-code;
+    font-weight: @font-big;
+  }
+
+  .line-number-show {
+    color: @color-text;
+    font-weight: @font-big;
+  }
+
+  .line-number-hide {
+    color: @font-code;
+    font-weight: @font-big;
+  }
 
+
+  article {
+    overflow: hidden;
+  }
+
+  .last-computed {
+    overflow: hidden;
+    color: @font-code;
+
+    .float-right {
+      float: right;
+      margin-left: @5px;
     }
+
+    /deep/ .is-dot {
+      margin-top: 7px;
+      margin-right: @5px;
+    }
+
   }
+}
 </style>

File diff suppressed because it is too large
+ 385 - 450
src/components/relation/overview/Modal/RelationMaintain.vue


+ 2 - 1
src/components/relation/overview/Modal/getCascader.vue

@@ -124,7 +124,8 @@ export default {
         }
       }
       let param3 = {
-        Filters: `ProjectId='${this.projectId}';CalcName='${this.RelationTypeName}'`
+        // Filters: `ProjectId='${this.projectId}';CalcName='${this.RelationTypeName}'`
+        calcName: this.RelationTypeName
 
       }
       let promise2 = new Promise((resolve, reject) => {

+ 3 - 2
src/components/relation/overview/Modal/setCascader.vue

@@ -116,7 +116,8 @@ export default {
         }
       }
       let param3 = {
-        Filters: `ProjectId='${this.projectId}';CalcName='${this.RelationTypeName}'`
+        // Filters: `ProjectId='${this.projectId}';CalcName='${this.RelationTypeName}'`
+        calcName: this.RelationTypeName
 
       }
       let promise2 = new Promise((resolve, reject) => {
@@ -135,7 +136,7 @@ export default {
         })
       })
       Promise.all([promise1, promise2, promise3]).then((res) => {
-        let allData = res[0], data = res[1], arr = res[2].Content
+        let allData = res[0], data = res[1], arr = res[2].content
         this.options = this.formatOptions(allData.content)
         if (!this.all) {
           this.content = data.content.map(t => {

+ 31 - 18
src/components/relation/relationShip/Modal/addRelationShip.vue

@@ -62,10 +62,11 @@
             </p>
             <el-form-item
               v-for="(item,index) in ruleForm.codeList"
+              style="margin-bottom: 26px;"
               :key="index"
               :prop="`codeList.${index}.value`"
               :rules="rules.codeList"
-              :error="fromError"
+              :error="item.fromError"
             >
               <el-input
                 v-model="item.value"
@@ -111,19 +112,19 @@
 </template>
 
 <script>
-  import {relAdd} from "../../../../api/relation/api";
+import {relAdd} from "../../../../api/relation/api";
 
-  export default {
-    name: "addRelationShip",
-    props: ['values'],
-    data() {
-      var checkCode = (rule, value, callback) => {
-        //TODO
-        callback()
-      }
-      var checkMain = (rule, value, callback) => {
-        //TODO
-        callback()
+export default {
+  name: "addRelationShip",
+  props: ['values'],
+  data() {
+    var checkCode = (rule, value, callback) => {
+      //TODO
+      callback()
+    }
+    var checkMain = (rule, value, callback) => {
+      //TODO
+      callback()
       }
       var codeList = (rule, value, callback) => {
         //TODO
@@ -140,10 +141,10 @@
           label: 'CADID图纸编码'
         }, {
           value: 'name',
-          label: '设备名称'
+          label: '名称'
         }, {
           value: 'id',
-          label: '设备ID'
+          label: 'ID'
         }, {
           value: 'localId',
           label: '本地编码'
@@ -157,7 +158,9 @@
         ruleForm: {
           main: '',
           codeList: [{
-            value: ''
+            value: '',
+            fromError: '',
+            key: +new Date()
           }]
         },
         rules: {
@@ -187,7 +190,8 @@
       addCode() {
         this.ruleForm.codeList.push({
           value: '',
-          key: Date.now()
+          key: Date.now(),
+          fromError: ''
         })
       },
       removeCode(item) {
@@ -202,6 +206,7 @@
           if (valid) {
             let arr = []
             for(let item  of this.ruleForm.codeList) {
+              item.fromError = ''
               if(item.value) {
                 arr = arr.concat(item.value)
               }
@@ -220,7 +225,15 @@
                   // this.mainError = res.data.Message
                   this.$nextTick(()=>{this.mainError = res.data.message})
                 } else if(res.data.errorType == 2) {
-                  this.$nextTick(()=>{this.fromError = res.data.message})
+                  const str = res.data.message.split(':')
+                  this.$nextTick(()=>{
+                    this.ruleForm.codeList.forEach(t => {
+                      if (str.length > 1 && t.value == str[0]) {
+                        t.fromError = res.data.message;
+                        t.key = +new Date()
+                      }
+                    })
+                  })
                 } else {
                   this.$message.error(res.data.message);
                 }

+ 103 - 23
src/components/relation/relationShip/Modal/exportExcel.vue

@@ -9,7 +9,7 @@
         <el-col :span="8">
           <p>
             <i class="iconfont icon-doc-line"/>
-            {{values.currentNum}}{{length}}
+            {{values.currentNum}}{{graphicTypeNum}}
           </p>
 
           <a :href="downloadProject('excel')" target="_self">
@@ -68,6 +68,9 @@
         </el-timeline>
       </div>
       <!--            下载报告-->
+      <!-- <a :href="downloadProject('report')">
+        <el-button>{{values.downloadFile}}</el-button>
+      </a> -->
       <a :href="downloadProject('report')">
         <el-button>{{values.downloadFile}}</el-button>
       </a>
@@ -89,6 +92,7 @@
 <script>
 import { mapGetters } from 'vuex'
 import storage from '@/framework/utils/storage'
+import { graphicTypeNumber } from "@/api/relation/api";
 
 export default {
   name: "exportExcel",
@@ -98,19 +102,8 @@ export default {
       // relationCount:localStorage.getItem('count'),
       dialogExport: false,
       dialogProcess: false,
-      activities: [{
-        content: '数据文件处理中..',
-        size: 'large',
-        type: 'primary',
-        icon: 'el-icon-check',
-        color: '#0bbd87'
-      }, {
-        content: '数据处理成功',
-        color: '#0bbd87',
-        icon: 'el-icon-check',
-        size: 'large',
-        type: 'primary',
-      }],
+      graphicTypeNum: 0,
+      activities: [],
     }
   },
   computed: {
@@ -131,15 +124,25 @@ export default {
     },
   },
   methods: {
+      getGraphicTypeNum() {
+        const params = {
+            type: this.dataId.relType
+        }
+        graphicTypeNumber(params, res => {
+            if (res.content && res.content.length) {
+                this.graphicTypeNum = res.content[0] && res.content[0].count || 0;
+            }
+        })
+      },
       downloadProject(str) {
-        let relType = localStorage.getItem('RelationType') != '' ? `?relType=${localStorage.getItem('RelationType')}` : '';
+        let relType = localStorage.getItem('RelationType') != '' ? `&relType=${localStorage.getItem('RelationType')}` : '';
         let zoneType = localStorage.getItem('ZoneType') != '' ? `&zoneType=${localStorage.getItem('ZoneType')}` : '';
         let url;
         if (str === 'excel') {
           relType = localStorage.getItem('RelationType') ? `&relType=${localStorage.getItem('RelationType')}` : '';
-          url = `/api/datacenter/graphic/export?projectId=${this.projectId}&code=对象ID${relType}${zoneType}`
+          url = `/api/datacenter/graphic/export?projectId=${this.projectId}${relType}${zoneType}&code=对象ID`;
         } else {
-          url = `/api/datacenter/graphic/report-downloads${relType}${zoneType}`
+          url = `/api/datacenter/graphic/report-downloads?projectId=${this.projectId}${relType}${zoneType}`;
         }
         return url
       },
@@ -147,14 +150,84 @@ export default {
         // console.log(event.file, fileList)
       },
       success(event, file, fileList) {
-        this.dialogExport = true
-        this.dialogProcess = true
-
+				if (event.content && event.content[0] && event.content[0].state === "0") {
+					this.activities = [{
+						content: '数据文件处理中..',
+						size: 'large',
+						type: 'primary',
+						icon: 'el-icon-check',
+						color: '#0bbd87'
+					}, {
+						content: `关系全部导入成功(导入关系:${event.content[0].successCount} 条)`,
+						color: '#0bbd87',
+						icon: 'el-icon-check',
+						size: 'large',
+						type: 'success',
+					}]
+				} else if (event.content && event.content[0] && event.content[0].state === "1") {
+					this.activities = [{
+						content: '数据文件处理中..',
+						size: 'large',
+						type: 'primary',
+						icon: 'el-icon-check',
+						color: '#0bbd87'
+					}, {
+						content: `关系部分导入成功(导入成功:${event.content[0].successCount} 条;导入失败:${event.content[0].failCount} 条)`,
+						color: '#0bbd87',
+						icon: 'el-icon-check',
+						size: 'large',
+						type: 'success',
+					}]
+				} else if (event.content && event.content[0] && event.content[0].state === "2") {
+					this.activities = [{
+						content: '数据文件处理中..',
+						size: 'large',
+						type: 'primary',
+						icon: 'el-icon-check',
+						color: '#0bbd87'
+					}, {
+						content: '关系导入失败!',
+						color: '#f56c6c',
+						icon: 'el-icon-close',
+						size: 'large',
+						type: 'primary',
+					}]
+				} else {
+					this.activities = [{
+						content: '数据文件处理中..',
+						size: 'large',
+						type: 'primary',
+						icon: 'el-icon-check',
+						color: '#0bbd87'
+					}, {
+						content: '关系导入失败!',
+						color: '#f56c6c',
+						icon: 'el-icon-close',
+						size: 'large',
+						type: 'primary',
+					}]
+				}
+        this.dialogExport = false;
+        this.dialogProcess = true;
+        this.$emit('upDataTable')
       },
       error(event, file, fileList) {
-        this.dialogExport = true
-        this.dialogProcess = true
-
+				this.activities = [{
+					content: '数据文件处理中..',
+					size: 'large',
+					type: 'primary',
+					icon: 'el-icon-check',
+					color: '#0bbd87'
+        }, {
+					content: '文件上传失败!',
+					color: '#f56c6c',
+					icon: 'el-icon-close',
+					size: 'large',
+					type: 'primary',
+        }]
+        this.dialogExport = false;
+        this.dialogProcess = true;
+        this.$emit('upDataTable')
       },
       errBack() {
         this.dialogProcess = false
@@ -165,6 +238,13 @@ export default {
         this.$emit('upDataTable')
       },
 
+    },
+    watch: {
+        dialogExport(val) {
+            if(val) {
+                this.getGraphicTypeNum();
+            }
+        }
     }
   }
 </script>

File diff suppressed because it is too large
+ 22 - 23
src/data/deviceList.js


+ 18 - 8
src/data/menus.js

@@ -46,11 +46,11 @@ export default [
     icon: 'icon-jianzhu'
   },
 // 需采集的信息点
-  {
-    path: '/ready/collectsetting',
-    name: '需采集的信息点',
-    icon: 'icon-xinxi'
-  },
+//   {
+//     path: '/ready/collectsetold',
+//     name: '需采集的信息点',
+//     icon: 'icon-xinxi'
+//   },
 // 扫楼App用户管理
   {
     path: '/ready/appuser',
@@ -315,10 +315,20 @@ export default [
     disabled: true,
   },
 // 项目数据转换
+//   {
+//     path: '/relation/data',
+//     name: '项目数据转换',
+//     icon: 'icon-view',
+//     opts: [{
+//       name: '查看',
+//       basic: true,
+//       permission: 'system:role:query'
+//     }]
+//   },
   {
-    path: '/relation/data',
-    name: '项目数据转换',
-    icon: 'icon-view',
+    path: '/synclog',
+    name: '数据同步日志',
+    icon: 'icon-Log',
     opts: [{
       name: '查看',
       basic: true,

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


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