zhangyu vor 5 Jahren
Ursprung
Commit
fb9799a35f
100 geänderte Dateien mit 9055 neuen und 8066 gelöschten Zeilen
  1. 9 1
      build/webpack.base.conf.js
  2. 1 1
      index.html
  3. 1 1
      package.json
  4. 1 1
      src/api/framework.js
  5. 8 1
      src/api/scan/config.js
  6. 240 110
      src/api/scan/request.js
  7. BIN
      src/assets/logo.png
  8. 116 76
      src/assets/style/iconfont/iconfont.css
  9. BIN
      src/assets/style/iconfont/iconfont.eot
  10. 67 37
      src/assets/style/iconfont/iconfont.svg
  11. BIN
      src/assets/style/iconfont/iconfont.ttf
  12. BIN
      src/assets/style/iconfont/iconfont.woff
  13. 8 2
      src/assets/style/style.scss
  14. 497 648
      src/components/business_space/business/handsontable.vue
  15. 8 26
      src/components/business_space/dialogs/detailsDialog.vue
  16. 1 1
      src/components/business_space/dialogs/facilityDialog.vue
  17. 2 1
      src/components/business_space/dialogs/list/guaranteeDialog.vue
  18. 4 5
      src/components/business_space/graphy/business.vue
  19. 3 3
      src/components/business_space/lib/uploadImgsName.vue
  20. 3 6
      src/components/business_space/table/businessTable.vue
  21. 2 2
      src/components/business_space/table/equipTable.vue
  22. 1 1
      src/components/config_point/data_origin.vue
  23. 203 0
      src/components/config_point/dictionaryCascader.vue
  24. 5 5
      src/components/config_point/examine_main.vue
  25. 2 2
      src/components/config_point/find_keyword.vue
  26. 1 1
      src/components/config_point/select_one.vue
  27. 2 2
      src/components/config_point/step3_edit/auto_handle.vue
  28. 2 2
      src/components/config_point/step3_edit/enum_handle.vue
  29. 2 2
      src/components/config_point/step3_edit/formula_handle.vue
  30. 599 612
      src/components/config_point/step3_edit/index.vue
  31. 2 2
      src/components/config_point/step3_edit/no_handle.vue
  32. 4 4
      src/components/config_point/step3_edit/split_handle.vue
  33. 3 3
      src/components/config_point/step3_point/3_identify.vue
  34. 593 634
      src/components/config_point/step3_point/3_temps.vue
  35. 3 3
      src/components/config_point/step3_point/dialog_main.vue
  36. 3 3
      src/components/config_point/step3_point/steps3_main.vue
  37. 0 1
      src/components/dialogs/addDialog/dialogAssets.vue
  38. 53 162
      src/components/dialogs/changeRea.vue
  39. 5 1
      src/components/dialogs/list/guaranteeDialog.vue
  40. 2 2
      src/components/dialogs/list/insurerDialog.vue
  41. 1 1
      src/components/dialogs/list/supplierDialog.vue
  42. 124 151
      src/components/dialogs/list/systemType.vue
  43. 1 1
      src/components/ledger/addDialog/dialogSystem.vue
  44. 679 1007
      src/components/ledger/handsontables/assets.vue
  45. 456 946
      src/components/ledger/handsontables/device.vue
  46. 241 723
      src/components/ledger/handsontables/system.vue
  47. 12 4
      src/components/ledger/lib/assets.vue
  48. 65 71
      src/components/ledger/lib/cascader.vue
  49. 1 5
      src/components/ledger/lib/cenoteType.vue
  50. 72 55
      src/components/ledger/lib/floorCascader.vue
  51. 141 0
      src/components/ledger/lib/partsDieList.vue
  52. 1 3
      src/components/ledger/lib/qrcode.vue
  53. 46 70
      src/components/ledger/lib/system.vue
  54. 12 7
      src/components/ledger/lib/uploadImgs.vue
  55. 3 4
      src/components/ledger/lib/uploadImgsName.vue
  56. 155 253
      src/components/ledger/tableTransfers.vue
  57. 177 0
      src/components/point/dynamicdata/applyRulesDialog.vue
  58. 54 0
      src/components/point/dynamicdata/dataSource.vue
  59. 214 0
      src/components/point/dynamicdata/delRelationDialog.vue
  60. 59 0
      src/components/point/dynamicdata/dictionaryDevice.vue
  61. 263 0
      src/components/point/dynamicdata/equipRules.vue
  62. 147 0
      src/components/point/dynamicdata/historyDialog.vue
  63. 88 0
      src/components/point/dynamicdata/locationCascader.vue
  64. 54 0
      src/components/point/dynamicdata/locationFlag.vue
  65. 252 0
      src/components/point/dynamicdata/partsRules.vue
  66. 306 393
      src/data/menus.js
  67. 394 0
      src/data/old.js
  68. 12 6
      src/framework/layout/PageSidebar.vue
  69. 3 1
      src/framework/style/layout.scss
  70. 3 1
      src/main.js
  71. 275 192
      src/router/system.js
  72. 6 2
      src/utils/authutils.js
  73. 133 0
      src/utils/handsontable/buildFloorData.js
  74. 1 0
      src/utils/handsontable/delType.js
  75. 52 5
      src/utils/handsontable/fillterField.js
  76. 19 2
      src/utils/handsontable/mainText.js
  77. 262 158
      src/utils/handsontable/notShow.js
  78. 3 3
      src/utils/point_edit/handson_header.js
  79. 2 2
      src/utils/point_edit/steps2.js
  80. 4 4
      src/utils/point_edit/steps3.js
  81. 23 9
      src/utils/scan/tools.js
  82. 0 512
      src/views/business_space/business_list/index.vue
  83. 14 3
      src/views/dasboard/index.vue
  84. 0 2
      src/views/data_admin/buildData/index.vue
  85. 1 1
      src/views/data_admin/buildGraphy/graphyCanvas.vue
  86. 2 2
      src/views/data_admin/buildGraphy/graphyTabs.vue
  87. 3 3
      src/views/data_admin/buildGraphy/lib/uploadImgsName.vue
  88. 223 226
      src/views/data_admin/buildLog/index.vue
  89. 36 0
      src/views/data_admin/buildTask/index.vue
  90. 25 21
      src/views/ledger/cenotelist/cenoteadd/index.vue
  91. 115 69
      src/views/ledger/cenotelist/index.vue
  92. 193 260
      src/views/ledger/facility/addfacility.vue
  93. 75 90
      src/views/ledger/facility/index.vue
  94. 26 51
      src/views/ledger/facility/parts/index.vue
  95. 91 134
      src/views/ledger/facility/partsmanage/addparts/index.vue
  96. 213 205
      src/views/ledger/facility/partsmanage/index.vue
  97. 511 9
      src/views/ledger/property/addproperty.vue
  98. 225 0
      src/views/ledger/property/addpropertys.vue
  99. 30 35
      src/views/ledger/property/index.vue
  100. 0 0
      src/views/rent/rentlist/index.vue

+ 9 - 1
build/webpack.base.conf.js

@@ -24,7 +24,7 @@ module.exports = {
             : config.dev.assetsPublicPath
     },
     resolve: {
-        extensions: ['.js', '.vue', '.json'],
+        extensions: ['.ts', '.js', '.vue', '.json'],
         alias: {
             'vue$': 'vue/dist/vue.esm.js',
             '@': resolve('src'),
@@ -46,6 +46,14 @@ module.exports = {
                 options: vueLoaderConfig
             },
             {
+                test: /\.tsx?$/,
+                loader: 'ts-loader',
+                exclude: /node_modules/,
+                options: {
+                  appendTsSuffixTo: [/\.vue$/],
+                }
+            },
+            {
                 test: /\.js$/,
                 loader: 'babel-loader',
                 include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]

+ 1 - 1
index.html

@@ -4,7 +4,7 @@
 <head>
     <meta charset="utf-8" />
     <meta name="viewport" content="width=device-width,initial-scale=1.0" />
-    <link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_1112731_tq1523n9oo.css">
+    <link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_1318214_i7toym6dora.css">
     <title>sagacloud-admin</title>
 </head>
 

+ 1 - 1
package.json

@@ -73,4 +73,4 @@
         "last 2 versions",
         "not ie <= 8"
     ]
-}
+}

+ 1 - 1
src/api/framework.js

@@ -11,7 +11,7 @@ function toLogin() {
 }
 
 function checkMenu(menu, ps) {
-    let result = { name: menu.name, icon: menu.icon, path: menu.path }
+    let result = { name: menu.name, icon: menu.icon, path: menu.path, disabled: menu.disabled }
     if (menu.children) {
         // 如果有下级菜单权限,则自动拥有上级菜单权限
         result.children = []

+ 8 - 1
src/api/scan/config.js

@@ -3,4 +3,11 @@ export const api = '/ScanBuilding';
 export const sass = 'sass';
 export const physics = '/data-platform-3';
 export const business = '/business-space'
-export const venders = '/venders'
+export const venders = '/venders'
+export const zone = {
+  GeneralZone: 'zone-general', //默认分区
+  PowerSupplyZone: 'zone-power-supply', //供电分区
+  LightingZone: 'zone-lighting', //照明分区
+  AirConditioningZone: 'metaspace', //空调分区
+  TenantZone: 'zone-tenant' //租赁分区
+}

+ 240 - 110
src/api/scan/request.js

@@ -1,11 +1,9 @@
 import fetch from './fetch'
-import { api, physics, business, venders, baseUrl } from './config.js'
+import { api, physics, business, venders, baseUrl, zone } from './config.js'
 import http from './httpUtil'
 let arithmetic = '/arithmetic'
 
 var Comming = 'revit'
-var ProjId = 'Pj1101080001'
-var UserId = '25518428919955458'
     //获取打印标签模板test
 export function getTest() {
     return fetch({ method: 'GET', url: `${api}/service/template/note_template` })
@@ -671,13 +669,6 @@ export function getBillPropList(param, success) {
     http.postJson(url, data, success)
 }
 
-//台账修改资产信息
-export function updateProperty(param, success) {
-    let url = `${physics}/property/update?projectId=${param.ProjId}&secret=${param.secret}`
-    let data = param.data
-    http.postJson(url, data, success)
-}
-
 //台账获取设备列表
 export function getBillEquipList(param, success) {
     let url = `${business}/equip/list?projectId=${param.ProjId}&secret=${param.secret}`
@@ -734,108 +725,81 @@ export function delBatchList(param, success) {
 
 //获取竖井类型
 export function getCenoteType(param, success) {
-    let url = `${baseUrl}/datacenter/shaft/queryShaftFuncType?projectId=${param.ProjId}&secret=${param.secret}`
-    let data = param.data
-    http.postJson(url, data, success)
-}
-
-//获取竖井表头信息
-export function getCenoteTableHeader(param, success) {
-    let url = `${baseUrl}/datacenter/shaft/queryDic?projectId=${param.ProjId}&secret=${param.secret}`
-    let data = param.data
-    http.postJson(url, data, success)
+    let url = `${baseUrl}/datacenter/shaft/query-shaft-functype`
+    http.postJson(url, param, success)
 }
 
 //获取竖井表格内容信息
 export function getCenoteTableData(param, success) {
-    let url = `${baseUrl}/datacenter/shaft/queryWithCount?projectId=${param.ProjId}&secret=${param.secret}`
-    let data = param.data
-    http.postJson(url, data, success)
+    let url = `${baseUrl}/datacenter/shaft/query-with-count`
+    http.postJson(url, param, success)
 }
 
 //添加竖井信息
 export function createCenoteTableData(param, success) {
-    let url = `${baseUrl}/datacenter/shaft/batchCreate?projectId=${param.ProjId}&secret=${param.secret}`
-    let data = param.data
-    http.postJson(url, data, success)
+    let url = `${baseUrl}/datacenter/shaft/create`
+    http.postJson(url, param, success)
 }
 
 //修改竖井信息
 export function updataCenoteTableData(param, success) {
-    let url = `${baseUrl}/datacenter/shaft/update?projectId=${param.ProjId}&secret=${param.secret}`
-    let data = param.data
-    http.postJson(url, data, success)
+    let url = `${baseUrl}/datacenter/shaft/update`
+    http.postJson(url, param, success)
 }
 
 //删除竖井信息
 export function deleteCenoteTableData(param, success) {
-    let url = `${baseUrl}/datacenter/shaft/delete?projectId=${param.ProjId}&secret=${param.secret}`
-    let data = param.data
-    http.postJson(url, data, success)
+    let url = `${baseUrl}/datacenter/shaft/delete`
+    http.postJson(url, param, success)
 }
 
 //竖井关联元空间
 export function saveCenoteRelateSpace(param, success) {
-    let url = `${baseUrl}/datacenter/shaft/relateSpace?projectId=${param.ProjId}&secret=${param.secret}`
-    let data = param.data
-    http.postJson(url, data, success)
-}
-
-//获取租户表头信息
-export function getRentTableHeader(param, success) {
-    let url = `${baseUrl}/datacenter/tenant/queryDic?projectId=${param.ProjId}&secret=${param.secret}`
-    let data = param.data
-    http.postJson(url, data, success)
+    let url = `${baseUrl}/datacenter/shaft/relate-space`
+    http.postJson(url, param, success)
 }
 
 //获取租户表格内容信息
 export function getRentTableData(param, success) {
-    let url = `${baseUrl}/datacenter/tenant/queryWithCount?projectId=${param.ProjId}&secret=${param.secret}`
-    let data = param.data
-    http.postJson(url, data, success)
+    let url = `${baseUrl}/datacenter/tenant/query-with-count`
+    http.postJson(url, param, success)
 }
 
 //创建租户信息
 export function createRentTableData(param, success) {
-    let url = `${baseUrl}/datacenter/tenant/batchCreate?projectId=${param.ProjId}&secret=${param.secret}`
-    let data = param.data
-    http.postJson(url, data, success)
+    let url = `${baseUrl}/datacenter/tenant/create`
+    http.postJson(url, param, success)
 }
 
 //修改租户信息
 export function updataRentTableData(param, success) {
-    let url = `${baseUrl}/datacenter/tenant/update?projectId=${param.ProjId}&secret=${param.secret}`
-    let data = param.data
-    http.postJson(url, data, success)
+    let url = `${baseUrl}/datacenter/tenant/update`
+    http.postJson(url, param, success)
 }
 
 //删除租户信息
 export function deleteRentTableData(param, success) {
-    let url = `${baseUrl}/datacenter/tenant/delete?projectId=${param.ProjId}&secret=${param.secret}`
-    let data = param.data
-    http.postJson(url, data, success)
+    let url = `${baseUrl}/datacenter/tenant/delete`
+    http.postJson(url, param, success)
 }
 
 //关联分区空间
 export function saveRentRelateSpace(param, success) {
-    let url = `${baseUrl}/datacenter/tenant/relateSpace?projectId=${param.ProjId}&secret=${param.secret}`
-    let data = param.data
-    http.postJson(url, data, success)
+    let url = `${baseUrl}/datacenter/tenant/relate-space`
+    http.postJson(url, param, success)
 }
 
 //扫楼创建资产
 export function createFmList(param, success) {
     let url = `${api}/service/fm/create`
     param.Comming = Comming
-    let data = param
-    http.postJson(url, data, success)
+    http.postJson(url, param, success)
 }
 
 export function createAssetsList(param, success) {
     let url = `${api}/service/fm/create_list`
     param.Comming = Comming
-    let data = param
-    http.postJson(url, data, success)
+    http.postJson(url, param, success)
 }
 
 export function getListForBuss(param, success) {
@@ -859,43 +823,44 @@ export function getBasicMatch(param) {
 //设备清单-查询设备内容
 export function getEquipTableCon(param, success) {
     let url = `${baseUrl}/equip-component/equip-query/equip-components`;
-    let data = param;
-    http.postJson(url, data, success)
+    http.postJson(url, param, success)
 }
 
 //设备清单-查询当前设备下的部件分类
 export function getEquipPartsType(param, success) {
     let url = `${baseUrl}/equip-component/equip-query/components-count`;
-    let data = param;
-    http.postJson(url, data, success)
+    http.postJson(url, param, success)
 }
 
 //设备清单-查询当前设备类下的部件分类
 export function getPartsAllType(param, success) {
     let url = `${baseUrl}/equip-component/equip-query/equip-compon`;
-    let data = param;
-    http.getJson(url, data, success)
+    http.getJson(url, param, success)
 }
 
 //all - 查询数据字典 --列表表头
 export function getDataDictionary(param, success) {
-    let url = `${baseUrl}/datacenter/data-dictionary/query`;
-    let data = param;
+    let url = `${baseUrl}/datacenter/data-dictionary/project/query?type=${param.type}`;
+    let data = param.data
     http.postJson(url, data, success)
 }
 
+//设置项目数据字典显隐 --列表表头
+export function setDataDictionary(param, success) {
+    let url = `${baseUrl}/datacenter/data-dictionary/project/setting-dic-project`;
+    http.postJson(url, param, success)
+}
+
 //设备清单 - 根据分类查询部件列表内容
 export function getEquipPartsCon(param, success) {
     let url = `${baseUrl}/equip-component/equip-query/components-property`;
-    let data = param;
-    http.postJson(url, data, success)
+    http.postJson(url, param, success)
 }
 
 //设备清单 - 新增部件
 export function createPart(param, success) {
     let url = `${baseUrl}/datacenter/component/create`;
-    let data = param;
-    http.postJson(url, data, success)
+    http.postJson(url, param, success)
 }
 
 //设备清单 - 删除部件
@@ -915,22 +880,55 @@ export function updateParts(param, success) {
 //设备清单 - 创建设备
 export function createEquip(param, success) {
     let url = `${baseUrl}/datacenter/equip/create`;
-    let data = param;
-    http.postJson(url, data, success)
+    http.postJson(url, param, success)
+}
+
+//设备清单 - 创建设备-关联资产-关联系统
+export function createEquipAndProperty(param, success) {
+    let url = `${baseUrl}/equip-component/equip-query/creat-equip-pro`;
+    http.postJson(url, param, success)
 }
 
 //设备清单 - 更新设备
 export function updateEquip(param, success) {
     let url = `${baseUrl}/datacenter/equip/update`;
-    let data = param;
-    http.postJson(url, data, success)
+    http.postJson(url, param, success)
 }
 
 //设备清单 - 删除设备
 export function deleteEquip(param, success) {
     let url = `${baseUrl}/datacenter/equip/delete`;
-    let data = param;
-    http.postJson(url, data, success)
+    http.postJson(url, param, success)
+}
+
+//设备清单 - 查询系统关联专业 - 查询系统信息 - 查询系统所属专业类型
+export function queryLinkSys(param, success) {
+    let url = `${baseUrl}/datacenter/general—system/query`;
+    http.postJson(url, param, success)
+}
+
+//设备清单 - 设备关联系统 设备1-n
+export function equipLinkSys(param, success) {
+    let url = `${baseUrl}/datacenter/sy-in-eq/link-sy`;
+    http.postJson(url, param, success)
+}
+
+//设备清单 - 设备关联系统 系统1-n   
+export function sysLinkEquip(param, success) {
+    let url = `${baseUrl}/datacenter/sy-in-eq/link-eq`;
+    http.postJson(url, param, success)
+} 
+
+//设备清单 - 统计项目下所有设备数量
+export function countEquip(param, success) {
+    let url = `${baseUrl}/datacenter/equip/count`;
+    http.postJson(url, param, success)
+}
+
+//设备清单 - 查询设备信息
+export function queryEquip(param, success) {
+    let url = `${baseUrl}/datacenter/equip/query`;
+    http.postJson(url, param, success)
 }
 
 //创建资产所需(Family族id3位编码)-根据设备类型(4位编码)或部件类型(6位编码)查询
@@ -943,111 +941,243 @@ export function getEquipBelongs(param, success) {
 //创建资产
 export function createPropertyData(param, success) {
     let url = `${baseUrl}/datacenter/property/create`;
-    let data = param;
-    http.postJson(url, data, success)
+    http.postJson(url, param, success)
+}
+
+//查询资产
+export function queryProperty(param, success) {
+    let url = `${baseUrl}/datacenter/property/query`;
+    http.postJson(url, param, success)
+}
+
+//查询资产 同时关联设备信息
+export function propertyLinkEq(param, success) {
+    let url = `${baseUrl}/equip-component/property/property-query`;
+    http.postJson(url, param, success)
+}
+
+//查询设备或部件
+export function queryPartsDie(param, success) {
+    let url = `${baseUrl}/equip-component/equip-query/pagequery`;
+    http.postJson(url, param, success)
+}
+
+//根据条件查询项目下设备部件数量
+export function countPartsDie(param, success) {
+    let url = `${baseUrl}/equip-component/equip-query/count`;
+    http.postJson(url, param, success)
+}
+
+//根据设备或部件批量创建资产
+export function createPropertys(param, success) {
+    let url = `${baseUrl}/equip-component/equip-query/creat-propertys`;
+    http.postJson(url, param, success)
+}
+
+//根据条件查询统计数量
+export function countProperty(param, success) {
+    let url = `${baseUrl}/datacenter/property/count`;
+    http.postJson(url, param, success)
+}
+
+//根据id删除资产信息
+export function deleteProperty(param, success) {
+    let url = `${baseUrl}/datacenter/property/delete`;
+    http.postJson(url, param, success)
+}
+
+//更新资产信息
+export function updateProperty(param, success) {
+    let url = `${baseUrl}/datacenter/property/update`;
+    http.postJson(url, param, success)
+}
+
+//更新系统信息
+export function updateGeneralSys(param, success) {
+    let url = `${baseUrl}/datacenter/general—system/update`;
+    http.postJson(url, param, success)
+}
+
+//删除系统信息
+export function deleteGeneralSys(param, success) {
+    let url = `${baseUrl}/datacenter/general—system/delete`;
+    http.postJson(url, param, success)
+}
+
+//创建系统信息
+export function createGeneralSys(param, success) {
+    let url = `${baseUrl}/datacenter/general—system/create`;
+    http.postJson(url, param, success)
+}
+
+//查询不在当前系统下的设备
+export function getEquipNotInSys(param, success) {
+    let url = `${baseUrl}/equip-component/equip-query/equip-sys?sysId=${param.sysId}`;
+    http.postJson(url, param.data, success)
+}
+
+//查询当前系统下的设备
+export function getEquipInSys(param, success) {
+    let url = `${baseUrl}/equip-component/equip-query/sys-equip`;
+    http.postJson(url, param, success)
+}
+
+//根据条件查询统计数量
+export function countGeneralSys(param, success) {
+    let url = `${baseUrl}/datacenter/general—system/count`;
+    http.postJson(url, param, success)
+}
+
+//头部信息查询(查询所有设备类型-所有部件类型-所有系统类型-所有专业类型)
+export function queryPhysicsAllType(param, success) {
+    let url = `${baseUrl}/datacenter/class-def/category?type=${param}`;
+    http.postJson(url, {}, success)
+}
+
+//字典头部信息查询接口
+export function queryDictionaryHead(param, success) {
+    let url = `${baseUrl}/datacenter/class-def/query`;
+    http.postJson(url, param, success)
 }
 
 //动态数据关联-冲突选择确认
 export function dynamicClashConfirm(param, success) {
     let url = `${baseUrl}/pointconfig/dynamic/clashconfirm`;
-    let data = param;
-    http.postJson(url, data, success)
+    http.postJson(url, param, success)
 }
 
 //动态数据关联-查询数据源列表(P1&2)
 export function dynamicDataSource(param, success) {
     let url = `${baseUrl}/pointconfig/dynamic/datasource-list`;
-    let data = param;
-    http.postJson(url, data, success);
+    http.postJson(url, param, success);
 }
 
 //动态数据关联-查询设备类型列表(P1&2)
 export function dynamicDynEquipList(param, success) {
     let url = `${baseUrl}/pointconfig/dynamic/equipmenttype-list`;
-    let data = param;
-    http.postJson(url, data, success);
+    http.postJson(url, param, success);
 }
 
 //动态数据关联-执行对应结果
 export function dynamicExecute(param, success) {
     let url = `${baseUrl}/pointconfig/dynamic/execute`;
-    let data = param;
-    http.postJson(url, data, success);
+    http.postJson(url, param, success);
 }
 
 //动态数据关联-位置下拉列表(P2)
 export function dynamicLocationList(param, success) {
     let url = `${baseUrl}/pointconfig/dynamic/location-list`;
-    let data = param;
-    http.postJson(url, data, success);
+    http.postJson(url, param, success);
 }
 
 //动态数据关联-查询位置标签列表
 export function dynamicLocFlagList(param, success) {
     let url = `${baseUrl}/pointconfig/dynamic/locationflag-list`;
-    let data = param;
-    http.postJson(url, data, success)
+    http.postJson(url, param, success)
 }
 
 //动态数据关联-提示信息
 export function dynamicPromptmessage(param, success) {
     let url = `${baseUrl}/pointconfig/dynamic/promptmessage`;
-    let data = param;
-    http.postJson(url, data, success);
+    http.postJson(url, param, success);
 }
 
 //动态数据关联-提示冲突
 export function dynamicPromptobjs(param, success) {
     let url = `${baseUrl}/pointconfig/dynamic/promptobjs`;
-    let data = param;
-    http.postJson(url, data, success);
+    http.postJson(url, param, success);
 }
 
 //动态数据关联-查询对应关系(P1)
 export function dynamicQuery(param, success) {
     let url = `${baseUrl}/pointconfig/dynamic/query`;
-    let data = param;
-    http.postJson(url, data, success);
+    http.postJson(url, param, success);
 }
 
 //动态数据关联-待关联实例(P2)
 export function dynamicPendingobjs(param, success) {
     let url = `${baseUrl}/pointconfig/dynamic/query-pending-objs`;
-    let data = param;
-    http.postJson(url, data, success);
+    http.postJson(url, param, success);
 }
 
 //动态数据关联-待关联点位(P2)
 export function dynamicPendingPoint(param, success) {
     let url = `${baseUrl}/pointconfig/dynamic/query-pending-point`;
-    let data = param;
-    http.postJson(url, data, success);
+    http.postJson(url, param, success);
 }
 
 //动态数据关联-查点位
 export function dynamicQueryPoint(param, success) {
     let url = `${baseUrl}/pointconfig/dynamic/query-point`;
-    let data = param;
-    http.postJson(url, data, success);
+    http.postJson(url, param, success);
 }
 
 //动态数据关联-创建关联
 export function dynamicCreateRelation(param, success) {
     let url = `${baseUrl}/pointconfig/dynamic/relation-create`;
-    let data = param;
-    http.postJson(url, data, success);
+    http.postJson(url, param, success);
 }
 
 //动态数据关联-清除关联
 export function dynamicDeleteRelation(param, success) {
     let url = `${baseUrl}/pointconfig/dynamic/relation-delete`;
-    let data = param;
-    http.postJson(url, data, success);
+    http.postJson(url, param, success);
 }
 
 //动态数据关联-查询对象类列表(P1&2)
 export function dynamicPointTypeList(param, success) {
     let url = `${baseUrl}/pointconfig/dynamic/type-list`;
-    let data = param;
+    http.postJson(url, param, success)
+}
+
+//查询楼层信息
+export function floorQuery(param, success) {
+    let url = `${baseUrl}/datacenter/floor/query`;
+    http.postJson(url, param, success)
+}
+
+//查询建筑信息
+export function buildingQuery(param, success) {
+    let url = `${baseUrl}/datacenter/building/query`;
+    http.postJson(url, param, success)
+}
+
+//创建分区信息
+export function createZone(param, success) {
+    let data = param.data
+    let url = `${baseUrl}/datacenter/${zone[param.zone]}/create`;
+    http.postJson(url, data, success)
+}
+
+//删除分区信息
+export function deleteZone(param, success) {
+    let data = param.data
+    let url = `${baseUrl}/datacenter/${zone[param.zone]}/delete`;
+    http.postJson(url, data, success)
+}
+
+//查询分区信息
+export function queryZone(param, success) {
+    let data = param.data
+    let url = `${baseUrl}/datacenter/${zone[param.zone]}/query`;
     http.postJson(url, data, success)
+}
+
+//更新分区信息
+export function updateZone(param, success) {
+    let data = param.data
+    let url = `${baseUrl}/datacenter/${zone[param.zone]}/update`;
+    http.postJson(url, data, success)
+}
+
+//动态数据关联-查询对应关系(删除提示页)
+export function dynamicQueryPrompt(param, success) {
+    let url = `${baseUrl}/pointconfig/dynamic/query-prompt`;
+    http.postJson(url, param, success)
+}
+
+//动态数据关联-AI辅助
+export function dynamicQueryAI(param, success) {
+    let url = `${baseUrl}/pointconfig/dynamic/ai`;
+    http.postJson(url, param, success)
 }

BIN
src/assets/logo.png


Datei-Diff unterdrückt, da er zu groß ist
+ 116 - 76
src/assets/style/iconfont/iconfont.css


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


Datei-Diff unterdrückt, da er zu groß ist
+ 67 - 37
src/assets/style/iconfont/iconfont.svg


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


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


+ 8 - 2
src/assets/style/style.scss

@@ -1,8 +1,8 @@
-.iconwushuju {
+.icon-wushuju {
     display: block;
     width: 100px;
     height: 100px;
-    font-size: 50px;
+    font-size: 50px !important;
     margin: auto;
 }
 
@@ -12,6 +12,12 @@
     padding-top: 10px;
 }
 
+.left {
+    text-align: left;
+    background: #fff;
+    padding-top: 10px;
+}
+
 .right-nobg {
     text-align: right;
 }

Datei-Diff unterdrückt, da er zu groß ist
+ 497 - 648
src/components/business_space/business/handsontable.vue


+ 8 - 26
src/components/business_space/dialogs/detailsDialog.vue

@@ -45,9 +45,7 @@
 </template>
 
 <script>
-    import {
-        delManySpace
-    } from "@/api/scan/request";
+    import { deleteZone } from "@/api/scan/request";
     import equipTable from "@/components/business_space/table/equipTable";
     import addEquip from "@/components/business_space/table/addEquip";
     import {
@@ -154,29 +152,13 @@
                     })
                     .then(() => {
                         let param = {
-                            ProjId: this.projectId,
-                            secret: this.secret,
-                            data: {
-                                criteria: {
-                                    ids: [this.list.id]
-                                }
-                            }
-                        };
-                        delManySpace(param)
-                            .then(res => {
-                                if (res.data.Result == "success") {
-                                    this.$message({
-                                        type: "success",
-                                        message: "删除成功!"
-                                    });
-                                    this.$emit("del");
-                                } else {
-                                    this.$message.error(res.data.ResultMsg);
-                                }
-                            })
-                            .catch(() => {
-                                this.$message.error("请求发生错误");
-                            });
+                            zone: this.activeTabType.code,
+                            data: [{RoomID: this.list.id}]
+                        }
+                        deleteZone(param, res => {
+                            this.$message({ type: "success",  message: "删除成功!" })
+                            this.$emit("del")
+                        })
                     })
                     .catch(() => {
                         this.$message({

+ 1 - 1
src/components/business_space/dialogs/facilityDialog.vue

@@ -20,7 +20,7 @@
       </span>
     </span>
     <div id="detailsDialog" v-show="step == 1">
-      <p class="influence-p">{{data.infos.RoomLocalName || data.infos.RoomName || '--'}}</p>
+      <p class="influence-p">{{data.RoomLocalName || data.RoomName || '--'}}</p>
       <equip-table :activeTabType="activeTabType" ref="myEquip" :param="myDia"></equip-table>
     </div>
     <div v-show="step == 1">

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

@@ -63,6 +63,7 @@
 import myPagination from "@/components/business_space/lib/myPagination";
 import uploadFiles from '@/components/business_space/lib/uploadFiles'
 import { getListForGuarantee, createGuarantee } from "@/api/scan/request"
+import { mapGetters, mapActions } from "vuex"
 import tools from "@/utils/scan/tools"
 export default {
   components: {
@@ -151,7 +152,7 @@ export default {
       if (!!this.id) {
         let param = {
           data: {
-            projectId: this.$route.query.projId,
+            projectId: this.projectId,
             venderId: this.id
           }
         }

+ 4 - 5
src/components/business_space/graphy/business.vue

@@ -92,7 +92,7 @@
       class="center"
       style="height: 400px;padding-top:200px;box-sizing:border-box;"
     >
-        <i class="iconwushuju iconfont"></i>
+        <i class="icon-wushuju iconfont"></i>
         {{!!buildMess ? '请初始化平面图' : '请选择楼层'}}
     </div>
     <el-dialog title="提示" :visible.sync="dialogVisible" :before-close="clearDimension" width="30%">
@@ -485,7 +485,6 @@
                             } else {
                                 _this.$message("没有元空间数据")
                             }
-                            console.log(ids,'ids')
                             if(!!ids && ids.length){
                                 _this.bimIdToId(ids, data);
                             }else{
@@ -1280,9 +1279,9 @@
 <style lang="less">
     .canvasGraphy {
         position: relative;
-        canvas {
-            border: 1px solid #ccc;
-        }
+        // canvas {
+        //     border: 1px solid #ccc;
+        // }
         .header-search {
             position: absolute;
             top: 0;

+ 3 - 3
src/components/business_space/lib/uploadImgsName.vue

@@ -193,7 +193,7 @@ export default {
                 if (vm.type == 'image') {
                   vm.imagesArr.push(
                     {
-                      name: uploadKey,
+                      name: uploadKey + '',
                       key: uploadKey + "." + type,
                       systemId: "dataPlatform",
                       type: "image"
@@ -202,7 +202,7 @@ export default {
                 }
                 if (type == 'mp4') {
                   vm.imagesArr.push({
-                    name: uploadKey,
+                    name: uploadKey + '',
                     key: uploadKey + "." + type,
                     systemId: "dataPlatform",
                     type: "video"
@@ -212,7 +212,7 @@ export default {
                 }
                 if (vm.type == "video" && type == "png") {
                   vm.videoPicArr.push({
-                    name: uploadKey,
+                    name: uploadKey + '',
                     key: uploadKey + "." + type,
                     systemId: "dataPlatform",
                     type: "image_video"

+ 3 - 6
src/components/business_space/table/businessTable.vue

@@ -49,10 +49,7 @@
 <script>
 import { getBussines2, createRelation } from "@/api/scan/request";
 import myPagination from "@/components/common/myPagination.vue";
-import {
-        mapGetters,
-        mapActions
-    } from "vuex";
+import { mapGetters, mapActions } from "vuex";
 export default {
   name: "equip-table",
   components: {
@@ -244,7 +241,7 @@ export default {
 };
 </script>
 <style>
-.el-table tr th {
+/* .el-table tr th { */
   /* background: #fafafa !important; */
-}
+/* } */
 </style>

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

@@ -360,7 +360,7 @@
     };
 </script>
 <style>
-    .el-table tr th {
+    /* .el-table tr th { */
         /* background: #fafafa !important; */
-    }
+    /* } */
 </style>

+ 1 - 1
src/components/config_point/data_origin.vue

@@ -10,7 +10,7 @@
         <div class="doughnut-view">
             <doughnut v-if="renderData.Sum" type="type" width="200" height="200" :sum="renderData.Sum" :name="renderData.Name" :renderData="echartsData" :id="id"></doughnut>
             <div v-else class="center">
-                <i class="iconwushuju iconfont"></i>
+                <i class="icon-wushuju iconfont"></i>
                 暂无数据
             </div>
         </div>

+ 203 - 0
src/components/config_point/dictionaryCascader.vue

@@ -0,0 +1,203 @@
+<template>
+  <div>
+    <el-form ref="form" :rules='rules' :model="form">
+      <el-form-item prop="dict">
+        <el-cascader style='width: 100%;' :options='options' v-model='form.dict' @active-item-change='handleChange' :props='props' filterable
+          @change="changeSelect" ref="dictCas"></el-cascader>
+      </el-form-item>
+    </el-form>
+  </div>
+</template>
+<script>
+import {
+  getDataDictionary,//查询信息点
+  queryPhysicsAllType,//查询所有部件类型
+  queryDictionaryHead,//查询所有空间类型
+
+} from "@/api/scan/request"
+import { mapGetters, mapActions } from "vuex";
+import tools from "@/utils/scan/tools";
+export default {
+  data() {
+    return {
+      options: [
+        {
+          Code: 'Pj',
+          Name: '项目',
+          children: []
+        }, {
+          Code: 'Bd',
+          Name: '建筑',
+          children: []
+        }, {
+          Code: 'Fl',
+          Name: '楼层',
+          children: []
+        }, {
+          Code: 'Eq',
+          Name: '设备',
+          children: []
+        }, {
+          Code: 'Ec',
+          Name: '部件',
+          children: []
+        }, {
+          Code: 'Sy',
+          Name: '系统',
+          children: []
+        }, {
+          Code: 'Sp',
+          Name: '空间',
+          children: []
+        }, {
+          Code: 'VOTn',
+          Name: '租户',
+          children: []
+        },
+      ],
+      form: {
+        dict: [],
+      },
+      props: {
+        value: 'Code',
+        label: 'Name',
+        children: 'children'
+      },
+      rules: {
+        dict: [{ required: true, message: '请选择对应数据字典', trigger: 'blur' }]
+      },
+      typeRelation: {
+        Pj: 'Project',
+        Bd: 'Building',
+        Fl: 'Floor',
+        VOTn: 'Tenant',
+      }
+    }
+  },
+  created() {
+    this.getAllData()
+  },
+  methods: {
+    //选择
+    handleChange(val) {
+      let type = val[0];
+      let singleStr = "Pj-Bd-Fl-VOTn";
+      console.log(val)
+      if (type == "Eq" && val.length == 2) {
+        this.getDataPoint(val[1])
+      } else if (type == "Ec" && val.length == 2) {
+        this.getDataPoint(val[1])
+      } else if (type == "Sy" && val.length == 3) {
+        this.getDataPoint(val[2])
+      } else if (type == "Sp" && val.length == 2) {
+        this.getDataPoint(val[1])
+      } else if (singleStr.indexOf(type) > -1) {
+        this.hasChildren(type) && this.getDataPoint(type)
+      }
+    },
+    //获取物理世界所有设备类型
+    getAllData() {
+      queryPhysicsAllType('Equipment', res => {
+        this.options[3].children = this.formatOptions(res.Content)
+      })
+      queryPhysicsAllType('Component', res => {
+        this.options[4].children = this.formatOptions(res.Content)
+      })
+      queryPhysicsAllType('Major-System', res => {
+        let data = JSON.parse(JSON.stringify(res.Content).replace(/ListClassDef/g, 'children'));
+        this.options[5].children = this.formatOptions(data)
+      })
+      let param1 = {
+        Distinct: true,
+        Filters: "ParentId='Space'"
+      }
+      queryDictionaryHead(param1, res => {
+        this.options[6].children = this.formatOptions(res.Content)
+      })
+    },
+    //格式化options数据
+    formatOptions(arr) {
+      return arr.map(item => {
+        return {
+          Code: item.Code,
+          Name: item.Name,
+          children: item.children && item.children.length ? this.formatOptions(item.children) : []
+        }
+      })
+    },
+    //请求信息点
+    getDataPoint(type) {
+      let that = this;
+      let param = {
+        data: {
+          Filters: "InputMode='M' or InputMode='L'",
+          PageNumber: 1,
+          PageSize: 500
+        },
+        type: this.typeRelation[type] || type
+      }
+      getDataDictionary(param, res => {
+        let tempArr = res.Content.map(item => {
+          return {
+            Code: item.InfoPointCode,
+            Name: item.InfoPointName
+          }
+        })
+        this.pushPoints(this.options, tempArr, type);
+        this.pointDataSource = {}
+        res.Content.map(item => {
+          let code = item.InfoPointCode
+          this.pointDataSource[code] = item
+        })
+        this.$nextTick(() => {
+          this.changeSelect(this.form.dict)
+        })
+      })
+    },
+    //根据返回数据拼接options
+    pushPoints(options, arr, Code) {
+      options.map(option => {
+        if (option.Code == Code) {
+          option.children = arr;
+        } else {
+          if (option.children) {
+            this.pushPoints(option.children, arr, Code)
+          }
+        }
+      })
+    },
+    changeSelect(val) {
+      let labels = this.$refs.dictCas.currentLabels
+      this.$emit('change', { val: val, labels: labels })
+    },
+    //减少请求次数
+    hasChildren(Code) {
+      let flag = true;
+      this.options.map(option => {
+        if (option.Code == Code && option.children.length) {
+          flag = false;
+        }
+      })
+      return flag;
+    },
+    //设置值
+    setCascaderVal(value) {
+      this.form.dict = tools.deepCopy(value)
+      value.splice(value.length - 1, 1)
+      this.handleChange(value)
+    },
+    //校验是否选择
+    validate(cb) {
+      this.$refs.form.validate(valid => {
+        if (valid) {
+          cb(true)
+        } else {
+          cb(false)
+        }
+      })
+    },
+  }
+}
+</script>
+<style lang="less" scoped>
+</style>

+ 5 - 5
src/components/config_point/examine_main.vue

@@ -1,7 +1,7 @@
 <template>
     <div>
-        <select-one @check="typeCheck" :renderData="typeArr" infosKey="EquipmentType" name="原始点位描述中的设备类型关键字"></select-one>
-        <select-one @check="paramCheck" :renderData="identifyArr" infosKey="ownMess" name="原始点位描述中设备参数关键字"></select-one>
+        <select-one @check="typeCheck" :renderData="typeArr" infosKey="EquipmentType" name="原始点位描述中的对象类型关键字"></select-one>
+        <select-one @check="paramCheck" :renderData="identifyArr" infosKey="ownMess" name="原始点位描述中对象参数关键字"></select-one>
         <div class="handson-view saga-border">
             <div v-if="hotData.length" class="h100">
                 <div class="title-view">
@@ -17,7 +17,7 @@
                 </div>
             </div>
             <div v-else class="center">
-                <i class="iconwushuju iconfont"></i>
+                <i class="icon-wushuju iconfont"></i>
                 暂无数据
             </div>
         </div>
@@ -57,7 +57,7 @@
                 EquipmentType: "",
                 EquipmentParameter: "",
                 inputValue: "",
-                header: ['原始点位描述', '值/单位说明', '*识别的设备类型关键字', '*识别的设备参数关键字'],
+                header: ['原始点位描述', '值/单位说明', '*识别的对象类型关键字', '*识别的对象参数关键字'],
                 type: [{
                         data: 'Description',
                         readOnly: true
@@ -121,7 +121,7 @@
             },
             //设备参数被点击
             paramCheck(item) {
-                console.log(item, "设备参数")
+                console.log(item, "对象参数")
                 this.inputValue = ""
                 if (!!item) {
                     this.EquipmentParameter = (item.EquipmentParameter == "空" || !item.EquipmentParameter) ? null : item.EquipmentParameter

+ 2 - 2
src/components/config_point/find_keyword.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="view-find-word">
         <div class="saga-border" style="position:relative;">
-            <p class="center">请从下面的原始点位描述中选择"{{type == 'type' ? "设备类型" : "设备参数"}}"关键字</p>
+            <p class="center">请从下面的原始点位描述中选择"{{type == 'type' ? "对象类型" : "对象参数"}}"关键字</p>
             <div style="position:absolute;top: 0;right: 20px;">
                 <el-switch
                     @change="changeType(type)"
@@ -26,7 +26,7 @@
             <div class="left-view saga-border">
                 <doughnut v-if="!!sum" :sum="sum" type="left" :name="dataName" width="200" height="200" :renderData="echartsData"></doughnut>
                 <div v-else class="center">
-                    <i class="iconwushuju iconfont"></i>
+                    <i class="icon-wushuju iconfont"></i>
                     暂无数据
                 </div>
             </div>

+ 1 - 1
src/components/config_point/select_one.vue

@@ -22,7 +22,7 @@
             </li>
         </ul>
         <div v-else class="center" style="padding-top: 50px;box-sizing:border-box;">
-            <i class="iconwushuju iconfont"></i> 暂无数据
+            <i class="icon-wushuju iconfont"></i> 暂无数据
         </div>
     </div>
 </template>

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

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

+ 2 - 2
src/components/config_point/step3_edit/enum_handle.vue

@@ -1,7 +1,7 @@
 <template>
     <div class='edit-box'>
         <el-form ref='form' :rules='rules' :model='form' label-width='140px'>
-            <el-form-item v-if='devFlag' label='设备标识' prop='EquipmentMark'>
+            <el-form-item v-if='devFlag' label='对象标识' prop='EquipmentMark'>
                 <el-input v-model='form.EquipmentMark'></el-input>
             </el-form-item>
 
@@ -47,7 +47,7 @@ export default {
                 pointArr: [{ from: '', to: '' }]
             },
             rules: {
-                EquipmentMark: [{ required: true, message: '请输入设备标识', trigger: 'blur' }]
+                EquipmentMark: [{ required: true, message: '请输入对象标识', trigger: 'blur' }]
             }
         }
     },

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

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

Datei-Diff unterdrückt, da er zu groß ist
+ 599 - 612
src/components/config_point/step3_edit/index.vue


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

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

+ 4 - 4
src/components/config_point/step3_edit/split_handle.vue

@@ -1,15 +1,15 @@
 <template>
     <div class='edit-box'>
         <el-form v-if='form.devArr.length' class='form' ref='form' :model='form' label-width='140px'>
-            <el-form-item v-if='devFlag' label='原设备标识' prop="eqMark">
+            <el-form-item v-if='devFlag' label='原对象标识' prop="eqMark">
                 <el-input v-model='form.eqMark' :disabled="true"></el-input>
             </el-form-item>
             <div class='dev-know' v-for='(item,index) in form.devArr' :key='index'>
                 <el-form-item
                     v-if='devFlag'
-                    label='设备标识'
+                    label='对象标识'
                     :prop='"devArr." + index + ".EquipmentMark"'
-                    :rules='{required: true, message: "设备标识不能为空", trigger: "blur"}'>
+                    :rules='{required: true, message: "对象标识不能为空", trigger: "blur"}'>
                     <el-input v-model='item.EquipmentMark'></el-input>
                 </el-form-item>
                 <p class='strsub'>
@@ -20,7 +20,7 @@
                 <i v-if='index > 0' class='el-icon-minus del-sub-icon' @click='delDev(index)'></i>
             </div>
             <div class='add-btn-box'>
-                <el-button type='primary' @click='addDevs'>+添加设备标识</el-button>
+                <el-button type='primary' @click='addDevs'>+添加对象标识</el-button>
             </div>
             <p class='tranf-box'>
                 需要将截取值转换为标准值

+ 3 - 3
src/components/config_point/step3_point/3_identify.vue

@@ -11,11 +11,11 @@
                     <div class="collapse-item">
                         <div style="display: flex;justify-content: space-between; height: 40px; line-height: 40px;padding:0 5px;box-sizing:border-box;">
                             <p>
-                                <el-input  v-model="fillData" placeholder="批量填充空白的设备标识" style="width: 180px; margin-right: 10px;"></el-input>
+                                <el-input  v-model="fillData" placeholder="批量填充空白的对象标识" style="width: 180px; margin-right: 10px;"></el-input>
                                 <el-button @click="fillClick">填充</el-button>
                             </p>
                             <p style="display: flex">
-                                <span style="margin-right: 10px; color: #909399;" >AI建议的设备标识</span>
+                                <span style="margin-right: 10px; color: #909399;" >AI建议的对象标识</span>
                                 <span class='ai-eq' :title="item.EquipmentMark" @click="aiHandle(item.EquipmentMark)">{{item.EquipmentMark || '--'}}</span>
                             </p>
                         </div>
@@ -300,7 +300,7 @@
                     data: 'own'
                 })
                 data.colHeaders.splice(0, 0,'原始点位描述')
-                data.colHeaders.splice(0, 0,'设备标识')
+                data.colHeaders.splice(0, 0,'对象标识')
                 data.columns.push({
                     data: 'LocationFlag',
                     readOnly: true

Datei-Diff unterdrückt, da er zu groß ist
+ 593 - 634
src/components/config_point/step3_point/3_temps.vue


+ 3 - 3
src/components/config_point/step3_point/dialog_main.vue

@@ -1,8 +1,8 @@
 <!--steps3的左侧-->
 <template>
     <div class="steps3-dialog-main">
-        <select-one @check="typeCheck" :renderData="typeArr" :isSelected="true" isCheckInfo="EquipmentMarkStandardized" infosKey="EquipmentType" :name="'原始点位描述中识别的设备类型'"></select-one>
-        <select-one @check="paramCheck" :renderData="identifyArr" infosKey="ownMess" :name="'已标准化的设备标识'"></select-one>
+        <select-one @check="typeCheck" :renderData="typeArr" :isSelected="true" isCheckInfo="EquipmentMarkStandardized" infosKey="EquipmentType" :name="'原始点位描述中识别的对象类型'"></select-one>
+        <select-one @check="paramCheck" :renderData="identifyArr" infosKey="ownMess" :name="'已标准化的对象标识'"></select-one>
         <div class="own-collape">
             <ident-collape v-if="!isNull" ref="ident" @saved="resetTwo" :renderData="identDataArr"></ident-collape>
             <div v-else class="h100">
@@ -288,7 +288,7 @@
                             data: 'EquipmentMark'
                         })
                         data.colHeaders.splice(0, 0, '原始点位描述')
-                        data.colHeaders.splice(0, 0, '设备标识')
+                        data.colHeaders.splice(0, 0, '对象标识')
                         data.columns.push({
                             data: 'LocationFlag',
                             readOnly: true

+ 3 - 3
src/components/config_point/step3_point/steps3_main.vue

@@ -1,8 +1,8 @@
 <!--steps3的左侧-->
 <template>
     <div class="steps3-dialog-main">
-        <select-one @check="typeCheck" :renderData="typeArr" :isSelected="true" isCheckInfo="PhysicalRelated" infosKey="EquipmentType" :name="'原始点位描述中识别的设备类型'"></select-one>
-        <select-one @check="paramCheck" :isDel="true" @deleteItem="deleteItem" :renderData="identifyArr" :isSelected="true" isCheckInfo="PhysicalRelated" infosKey="ownMess" :name="'原始点位描述中识别的设备参数'"></select-one>
+        <select-one @check="typeCheck" :renderData="typeArr" :isSelected="true" isCheckInfo="PhysicalRelated" infosKey="EquipmentType" :name="'原始点位描述中识别的对象类型'"></select-one>
+        <select-one @check="paramCheck" :isDel="true" @deleteItem="deleteItem" :renderData="identifyArr" :isSelected="true" isCheckInfo="PhysicalRelated" infosKey="ownMess" :name="'原始点位描述中识别的对象参数'"></select-one>
         <div class="own-collape">
             <temp-collape ref="ident" :renderData="identDataArr" @changed="changed"></temp-collape>
         </div>
@@ -67,7 +67,7 @@
             //删除设备参数
             deleteItem(item) {
                 console.log(item, 'item')
-                this.$confirm(`<p style='text-align:center;'>确定删除设备参数与数字字典的对应关系</p><p style='text-align:center;'>删除需重新配置</p>`, '提示', {
+                this.$confirm(`<p style='text-align:center;'>确定删除对象参数与数字字典的对应关系</p><p style='text-align:center;'>删除需重新配置</p>`, '提示', {
                     dangerouslyUseHTMLString: true
                 }).then(_ => {
                     deleteRelationList({

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

@@ -472,7 +472,6 @@ export default {
           renderer: tools.customDropdownRenderer,
           editor: "chosen",
           chosenOptions: {
-            // multiple: true,//多选
             data: this.floorData
           }
         }

+ 53 - 162
src/components/dialogs/changeRea.vue

@@ -6,14 +6,8 @@
     <div>
       <div id="changeRea">
         <div class="title-search" style="margin-bottom: 10px;">
-          <el-input
-            placeholder="输入名称查询"
-            v-model="search"
-            size="small"
-            style="width:300px;"
-            clearable
-          ></el-input>
-          <el-button @click="getData" size="small">查找</el-button>
+          <el-input placeholder="输入名称或编码查询" v-model="search" size="small" style="width:300px;" clearable></el-input>
+          <el-button @click="getPropertyData" size="small">查找</el-button>
         </div>
         <div>
           <floor-cascader @change="changeFloor"></floor-cascader>
@@ -22,47 +16,41 @@
           <el-table :data="tableData" style="width: 100%" height="300px">
             <el-table-column label="资产名称">
               <template slot-scope="scope">
-                <el-radio
-                  v-model="radio"
-                  :label="scope.row.id"
-                >{{scope.row.infos.EquipLocalName || scope.row.infos.EquipName}}</el-radio>
+                <el-radio :label="scope.row.EquipID" :ref="scope.row.EquipID" :value="scope.row.EquipLocalName || scope.row.EquipName">
+                  {{scope.row.EquipLocalName || scope.row.EquipName}}
+                </el-radio>
               </template>
             </el-table-column>
             <el-table-column label="本地编码">
-              <template
-                slot-scope="scope"
-              >{{scope.row.infos.EquipLocalID || scope.row.infos.EquipID}}</template>
+              <template slot-scope="scope">{{scope.row.EquipLocalID || scope.row.EquipID}}</template>
             </el-table-column>
             <el-table-column prop="name" label="所在楼层">
-              <template slot-scope="scope">{{getFloor(scope.row.relation)}}</template>
+              <template slot-scope="scope">{{getFloor(scope.row.FloorId)}}</template>
             </el-table-column>
             <el-table-column label="设备族">
-              <template slot-scope="scope">{{getFramily(scope.row.family)}}</template>
+              <span>{{this.category.assetName}}</span>
             </el-table-column>
             <el-table-column label="安装位置">
-              <template slot-scope="scope">{{scope.row.infos.InstallLocation || "--"}}</template>
+              <template slot-scope="scope">
+                {{scope.row.LedgerParam?scope.row.LedgerParam.Siteinstall?scope.row.LedgerParam.Siteinstall.InstallLocation:"--":"--"}}
+              </template>
             </el-table-column>
           </el-table>
         </el-radio-group>
         <my-pagination :page="page" @change="changed" style="margin-top:10px;"></my-pagination>
         <div class="footer">
-          <el-button
-            type="primary"
-            @click="clickTrue"
-            style="display:block;margin: 10px auto 0;"
-          >确 定</el-button>
+          <el-button type="primary" @click="clickTrue" style="display:block;margin: 10px auto 0;">确 定</el-button>
         </div>
       </div>
     </div>
-    <param-details :isLoad="isLoad" :data="data"></param-details>
   </el-dialog>
 </template>
 <script>
 import myPagination from "@/components/ledger/lib/myPagination";
 import paramDetails from "@/components/dialogs/list/paramDetails"
-import { getBillPropList, getEquipmentFamily, getSpaceFloor, getBussines2, upDateTableMain } from "@/api/scan/request"
+import { getSpaceFloor, queryProperty } from "@/api/scan/request"
 import floorCascader from "@/components/ledger/lib/floorCascader";
-import {mapGetters, mapActions} from "vuex"
+import { mapGetters, mapActions } from "vuex"
 export default {
   components: {
     myPagination,
@@ -89,12 +77,7 @@ export default {
     return {
       search: "", //搜索文案
       radio: "",
-      tableData: [
-      ],
-      data: {},
-      isLoad: {
-        paramShow: false
-      },
+      tableData: [],
       page: {
         size: 50,
         sizes: [10, 30, 50, 100, 150, 200],
@@ -107,21 +90,17 @@ export default {
     };
   },
   created() {
-    this.getCode()
+    this.getFloorList();
   },
   computed: {
-    ...mapGetters("layout", [
-        "projectId",
-        "secret",
-        "userId"
-    ])
+    ...mapGetters("layout", ["projectId", "secret", "userId"])
   },
   mounted() { },
   methods: {
+    //根据楼层id对应楼层
     getFloor(relation) {
       let floor = !!relation ? relation.floor || "" : ""
       if (!!floor) {
-        console.log(floor)
         let floorName = ""
         this.floorList.map(item => {
           if (!!item.floors && item.floors.length) {
@@ -137,45 +116,16 @@ export default {
         return "--"
       }
     },
-
+    //确认选择
     clickTrue() {
-      if (!!this.radio) {
-        let param = {
-          UserId: this.userId,
-          ProjId: this.projectId
-        }
-        let paramList = [{
-          EquipmentId: this.category.id,
-          FmId: this.radio
-        }]
-        console.log(param, paramList)
-        upDateTableMain(param, paramList).then(res => {
-          this.$emit("close")
-          this.dialog.changeRea = false
-        })
-        // upDateTableMain(param, res => {
-        // })
+      if (this.radio) {
+        this.$emit('changeProperty', { PropertyId: this.radio, LinkEquipLocalName: this.$refs[this.radio].value });
+        this.dialog.changeRea = false;
       } else {
         this.$message("请先选择资产")
       }
     },
-
-    getFramily(code) {
-      console.log(code)
-      let name = ""
-      this.codeListCode.map(item => {
-        if (item.code == code) {
-          name = item.name
-        }
-      })
-      return name || "--"
-    },
-    getCode() {
-      getEquipmentFamily(res => {
-        this.codeListCode = res.Content
-        this.getFloorList()
-      })
-    },
+    //查询条件-所在建筑楼层
     getFloorList() {
       let param = {
         secret: this.secret,
@@ -191,114 +141,55 @@ export default {
         this.$message.error("请求错误")
       })
     },
+    //所在建筑楼层修改
     changeFloor(val) {
       this.mess = {
         buildId: val[0] || "",
         floorId: val[1] || ""
       }
-      this.getData()
-      console.log(val)
+      this.getPropertyData()
     },
+    //分页修改
     changed() {
-      this.getData()
-    },
-    //查询技术参数
-    lookParam(data) {
-      this.data = data
-      this.isLoad.paramShow = true
-    },
-    getChange() {
-      if (!!this.radio) {
-        this.$emit("changechangeRea", this.radio)
-        this.dialog.changeRea = false
-      } else {
-        this.$message("请选择型号")
-      }
-    },
-    searchKey() {
-      this.changePage()
+      this.getPropertyData()
     },
+    //弹窗显示时
     changePage() {
       this.page = {
         size: 50,
-        sizes: [10, 30, 50, 100, 150, 200],
+        sizes: [10, 30, 50, 100],
         total: 0,
         currentPage: 1
       }
-      this.getData()
+      this.getPropertyData()
     },
-    getData() {
-      // let param = {
-      //   data: {
-      //     filter: {
-      //       EquipLocalName: this.search
-      //     },
-      //     directOnly: false,
-      //     criteria: {
-      //       id: "",
-      //       graphType: "Pe2Eq",
-      //       side: -1,
-      //       type: ""
-      //     }
-      //   },
-      //   secret: this.secret,
-      //   ProjId: this.projectId
-      // }
-      let param = {
-        data: {
-          directOnly: false,
-          criteria: {
-            EquipLocalName: [this.search == ""? null: this.search],
-            id: "",
-            type: [],
-            exclude: [{
-              graphType: "Pe2Eq",
-              side: "fromId",
-            }]
-          }
-        },
-        secret: this.secret,
-        ProjId: this.projectId
+    //查询表数据
+    getPropertyData() {
+      let param = { 
+        Filters: `EquipmentId isNull;Family="${this.category.assetType}"`,
+        PageNumber: this.page.currentPage,
+        PageSize: this.page.size
       }
-      if (this.mess.buildId == "all") {
-        param.data.criteria.id = this.mess.ProjId
-      } else if (this.mess.buildId == "noKnow") {
-        param.data.criteria.id = this.mess.ProjId
-        param.data.directOnly = true
-      } else if (this.mess.floorId == "noKnow") {
-        param.data.criteria.id = this.mess.buildId
-        param.data.directOnly = true
+      //建筑id
+      if (this.mess.buildId == "noKnow") {
+        param.Filters += `;buildingId isNull`
+      } else if (this.mess.buildId && this.mess.buildId != "all") {
+        param.Filters += `;buildingId='${this.mess.buildId}'`
+      }
+      //楼层id
+      if (this.mess.floorId == "noKnow") {
+        param.Filters += `;floorId isNull`
       } else if (this.mess.floorId && this.mess.floorId != "all") {
-        param.data.criteria.id = this.mess.floorId
-      } else if (this.mess.floorId == 'all') {
-        param.data.criteria.id = this.mess.buildId
-      } else {
-        param.data.criteria.id = this.projectId
+        param.Filters += `;floorId='${this.mess.floorId}'`
       }
-      param.data.criteria.type = [this.getType(this.category.category)]
-      console.log(param)
-      getBussines2(param).then(res => {
-        this.tableData = res.data.Content
-        console.log(this.tableData, "this.tableData")
-        this.page.total = res.data.Count
-      })
-    },
-
-    getType(code) {
-      console.log(code, "code")
-      console.log(code.substring(2, 6))
-      let system = code.substring(2, 6), myCode = ""
-      this.codeListCode.map(item => {
-        if (!!item.content && item.content.length) {
-          item.content.map(child => {
-            if (child.code == system) {
-              myCode = item.code
-            }
-          })
-        }
+      //名称和编码
+      if (this.search) {
+        param.Filters += `;floorId='${this.mess.floorId}'`
+      }
+      queryProperty(param, res => {
+        this.tableData = res.Content
+        this.page.total = res.Total
       })
-      console.log(myCode)
-      return myCode
     }
   },
   watch: {

+ 5 - 1
src/components/dialogs/list/guaranteeDialog.vue

@@ -63,6 +63,7 @@
 import myPagination from "@/components/ledger/lib/myPagination";
 import uploadFiles from '@/components/ledger/lib/uploadFiles'
 import { getListForGuarantee, createGuarantee } from "@/api/scan/request"
+import { mapGetters, mapActions } from "vuex"
 import tools from "@/utils/scan/tools"
 export default {
   components: {
@@ -106,6 +107,9 @@ export default {
     };
   },
   created() { },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"])
+  },
   mounted() { },
   methods: {
     submitForm(formName) {
@@ -151,7 +155,7 @@ export default {
       if (!!this.id) {
         let param = {
           data: {
-            projectId: this.$route.query.projId,
+            projectId: this.projectId,
             venderId: this.id
           }
         }

+ 2 - 2
src/components/dialogs/list/insurerDialog.vue

@@ -3,7 +3,7 @@
 
 -->
 <template>
-  <el-dialog title="选择型号" :visible.sync="dialog.insurer" width="1000px">
+  <el-dialog title="选择保险公司" :visible.sync="dialog.insurer" width="1000px">
     <div>
       <div id="firm">
         <div class="title-search query-form" style="padding: 10px;margin-bottom: 10px;">
@@ -18,7 +18,7 @@
         </div>
         <el-radio-group v-model="radio" style="width:100%;">
           <el-table class="data-table" border ref="maintenance" :data="tableData" style="width: 100%" height="300px">
-            <el-table-column header-align='center' label="供应商名称">
+            <el-table-column header-align='center' label="保险公司名称">
               <template slot-scope="scope">
                 <el-tooltip :content="scope.row.name" placement="top">
                   <el-radio v-model="radio" :label="scope.row">{{scope.row.name}}</el-radio>

+ 1 - 1
src/components/dialogs/list/supplierDialog.vue

@@ -3,7 +3,7 @@
 
 -->
 <template>
-  <el-dialog title="选择型号" :visible.sync="dialog.supplier" width="1000px">
+  <el-dialog title="选择供应商" :visible.sync="dialog.supplier" width="1000px">
     <div>
       <div id="firm">
         <div class="title-search query-form" style="padding: 10px;margin-bottom: 10px;">

+ 124 - 151
src/components/dialogs/list/systemType.vue

@@ -6,19 +6,30 @@
     <div>
       <div id="systemType">
         <div class="title-search query-form" style="padding: 10px;margin-bottom: 10px;" v-if="type != 'read' ">
-          <el-input placeholder="输入名称或编码进行查询" v-model="search" size="small" style="width:300px; margin-right:10px" clearable></el-input>
-          <el-button size="small" @click="searchChecked">查找</el-button>
+          <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>
         </div>
         <el-table class='data-table' border :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.infos.SysLocalName || scope.row.infos.SysName}}</template>
+            <template slot-scope="scope">{{scope.row.SysLocalName || scope.row.SysName}}</template>
           </el-table-column>
           <el-table-column label="本地编码" header-align='center'>
-            <template slot-scope="scope">{{scope.row.infos.SysLocalID || '--'}}</template>
+            <template slot-scope="scope">{{scope.row.SysLocalID || '--'}}</template>
           </el-table-column>
           <el-table-column label="专业" header-align='center'>
-            <template slot-scope="scope">{{getName(scope.row.category)}}</template>
+            <template slot-scope="scope">{{scope.row.MajorName}}</template>
           </el-table-column>
           <el-table-column label="详情" header-align='center' width="100" align="center">
             <template slot-scope="scope">
@@ -26,13 +37,6 @@
             </template>
           </el-table-column>
         </el-table>
-        <!-- <div class="footer" v-if="type != 'read' ">
-          <el-button
-            type="primary"
-            @click="getChange"
-            style="display:block;margin: 10px auto 0;"
-          >确 定</el-button>
-        </div> -->
       </div>
     </div>
     <span slot="footer" class="dialog-footer">
@@ -46,7 +50,7 @@
 </template>
 <script>
 import myPagination from "@/components/ledger/lib/myPagination";
-import { getLib, getAllbusiness, getEqCode, getRelation } from "@/api/scan/request"
+import { queryLinkSys, getSpaceFloor, equipLinkSys } from "@/api/scan/request"
 import tools from "@/utils/scan/tools"
 import { mapGetters } from 'vuex'
 export default {
@@ -66,15 +70,14 @@ export default {
       type: String,
       default: ""
     },
-    infos: {
-      type: String,
-      default: ""
-    },
+    device: {},
+    curDevice: {
+      default: ''
+    },//设备id
     type: {
       type: String,
       default: "read"
     },
-    //默认值
     list: {
       type: [Array]
     }
@@ -86,163 +89,89 @@ export default {
       systemList: [],
       allData: [],
       multipleSelection: [],
-      changeData: [],
       iframeSrc: "",
-      iframeShow: false
+      iframeShow: false,
+      buildId: 'all', //查询条件
+      options: [], //系统所属建筑
     };
   },
   computed: {
-    ...mapGetters("layout", [
-      "projectId",
-      "secret",
-      "userId"
-    ])
+    ...mapGetters("layout", ["projectId", "secret", "userId"])
   },
   mounted() { },
   methods: {
-    searchChecked() {
-      let data = []
-      this.allData.map(item => {
-        if (item.category.indexOf(this.search) > -1 || (item.infos.SysLocalName && item.infos.SysLocalName.indexOf(this.search) > -1)) {
-          data.push(item)
-        }
-      })
-      this.tableData = data
-      this.changeData = this.multipleSelection
-    },
-
-    handleSelectionChange(val) {
-      this.multipleSelection = val;
-      if (this.changeData.length) {
-        this.multipleSelection = this.changeData
-        this.changeData = []
-      }
-    },
-
-    //设置默认
-    toggleSelection(rows) {
-      if (rows) {
-        rows.forEach(row => {
-          this.$refs.multipleTable.toggleRowSelection(row);
-        });
-      } else {
-        this.$refs.multipleTable.clearSelection();
-      }
-    },
-
-    getChange() {
-      if (this.multipleSelection.length >= 2) {
-        this.$confirm("确定关联多个系统?").then(_ => {
-          this.$emit("change", this.multipleSelection)
-          this.dialog.systemType = false
-        }).catch(_ => {
-        })
-      } else {
-        this.$emit("change", this.multipleSelection)
-        this.dialog.systemType = false
-      }
-    },
-
-    getName(code) {
-      if (!!code) {
-        let codeC = code.substring(0, 2), name = ""
-        this.systemList.map(item => {
-          if (item.code == codeC) {
-            name = item.class
-          }
-        })
-        return name
-      } else {
-        return "--"
-      }
-    },
-
-    //获取设备族
-    getEquipmentFamily() {
-      getEqCode().then(res => {
-        if (res.data.Result == "success") {
-          this.systemList = res.data.Content
-          this.getData()
-        } else {
-          this.$message.error("请求错误" + res.data.ResultMsg)
-        }
-      }).catch(_ => {
-        this.$message.error("请求错误")
-      })
-    },
-
+    //获取查询条件-建筑
     getData() {
-      let param = param = {
+      let param = {
         ProjId: this.projectId,
         secret: this.secret,
-        data: {
-          criteria: {
-            type: ["Sy"]
-          }
-        }
       }
-      getAllbusiness(param).then(res => {
-        if (res.data.Result == "success") {
-          if (this.type == "read" && !!this.infos) {
-            this.getRelation(res.data.Content)
-          } else {
-            this.allData = res.data.Content
-            this.tableData = res.data.Content
-            console.log(this.$refs, "refs", this.list, "list", this.graphyId, "graphy")
-            this.$refs.multipleTable.clearSelection();
-            this.getSelected(this.list, this.allData)
-          }
+      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)
+          this.$message.error(res.data.ResultMsg)
         }
-      }).catch(_ => {
-        this.$message.error("请求错误")
+      }).catch(err => {
+        this.$message.error(err)
       })
     },
-
-    //查询id对应系统
-    getRelation(table) {
-      getRelation({
-        ProjId: this.projectId,
-        secret: this.secret,
-        criterias: {
-          criteria: {
-            "to_id": this.infos,
-            "graph_id": this.graphyId
-          }
-        }
-      }).then(Response => {
-        let data = Response.data.Content
-        if (Response.data.Result == "success") {
-          if (table && table.length && data && data.length) {
-            let lastData = tools.getSameItems(table, "id", data, "from_id")
-            console.log(lastData)
-            this.tableData = lastData
-          } else {
-            this.tableData = []
+    //将数组转换成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
+              }
+            })
           }
         } else {
-          this.$message.error("请求错误" + Response.data.ResultMsg)
+          return {
+            value: item.id,
+            label: item.infos.BuildLocalName,
+            children: null,
+            isChilren: 1,
+          }
         }
-      }).catch(_ => {
-        this.$message.error("请求错误")
       })
     },
-
-    //设置默认选中项
-    getSelected(list, all) {
-      let map = []
-      if (all && all.length && list && list.length) {
-        all.map((item, index) => {
-          list.map(child => {
-            if (item.id == child.id) {
-              this.$refs.multipleTable.toggleRowSelection(item)
+    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)
             }
           })
         })
       }
     },
-
+    //确认
+    getChange() {
+      this.createRelatSys()
+      this.$emit("change", this.multipleSelection)
+      this.dialog.systemType = false
+      this.multipleSelection = []
+    },
     //点击详情
     lookDeatils(infos) {
       this.iframeSrc =
@@ -256,6 +185,44 @@ export default {
         "&type=1&code=" +
         infos.category.substring(2, 4);
       this.iframeShow = true;
+    },
+    //根据设备类型-查询系统关联专业
+    getTableData() {
+      let param = {
+        Filters: `category="${this.device.deviceId.substring(0, 2)}"`,
+        PageNumber: 1,
+        PageSize: 100
+      }
+      //建筑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 += `;SysLocalName contain "${this.search}" or SysLocalID contain "${this.search}"`
+      }
+      queryLinkSys(param, res => {
+        this.allData = res.Content
+        this.tableData = res.Content
+        this.toggleSelection(res.Content)
+      })
+    },
+    //添加设备关联系统关系
+    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: {
@@ -263,9 +230,15 @@ export default {
       deep: true,
       handler: function () {
         if (this.dialog.systemType) {
-          this.getEquipmentFamily()
+          this.getData()
+          this.getTableData()
         }
       }
+    },
+    projectId() {
+      this.buildId = 'all';
+      this.options = [];
+      this.getData()
     }
   }
 };

+ 1 - 1
src/components/ledger/addDialog/dialogSystem.vue

@@ -22,7 +22,7 @@
           <div>
             <div class="hanson-bar">
               <span>当前选择的设备族:{{deviceType.facility}}</span>
-              <div style="float:right;overflow:hidden;">
+              <div style="width:500px;float:right;overflow:hidden;">
                 <span>增加</span>
                 <el-input v-model="addNum" style="width:40px;" placeholder="增加个数" size="small"></el-input>
                 <span>个{{deviceType.facility}}</span>

Datei-Diff unterdrückt, da er zu groß ist
+ 679 - 1007
src/components/ledger/handsontables/assets.vue


Datei-Diff unterdrückt, da er zu groß ist
+ 456 - 946
src/components/ledger/handsontables/device.vue


Datei-Diff unterdrückt, da er zu groß ist
+ 241 - 723
src/components/ledger/handsontables/system.vue


+ 12 - 4
src/components/ledger/lib/assets.vue

@@ -16,7 +16,7 @@
 </template>
 <script>
 import {mapGetters} from 'vuex';
-import { getEquipmentFamily } from "@/api/scan/request";
+import { getEquipBelongs } from "@/api/scan/request";
 export default {
   name: "getCode",
   props: {
@@ -66,7 +66,15 @@ export default {
       this.$emit("change", value)
     },
     async getData() {
-      await getEquipmentFamily(res => {
+      let params = {
+        data:{
+          Distinct: true,
+          PageNumber: 1,
+          PageSize: 500,
+          Projection:["Family","FamilyName"]
+        }
+      }
+      await getEquipBelongs(params, res => {
         this.options = this.changeArr(res.Content)
         if (!!this.value && this.value.length) {
           let value = {}
@@ -85,7 +93,7 @@ export default {
     changeArr(arr) {
       let data = [];
       arr.map(item => {
-        data.push({ code: item.code, facility: item.name, disabled: false })
+        data.push({ code: item.Family, facility: item.FamilyName, disabled: false })
       });
       return data;
     },
@@ -100,7 +108,7 @@ export default {
     },
     changeList() {
       this.options = this.options.filter(item => {
-        if (this.content.indexOf(item.code) > -1) {
+        if (this.content.find(value => value.Family == item.code)) {
           return item
         }
         // item.disabled = true

+ 65 - 71
src/components/ledger/lib/cascader.vue

@@ -1,22 +1,13 @@
 <template>
   <div id="cascaderMap">
     <span class="buildFloor" style="margin-right: 12px;">设备类别</span>
-    <el-cascader
-      placeholder="请选择"
-      :options="options"
-      v-model="value"
-      :props="props"
-      filterable
-      :style="isWidth ? '' : 'width:160px;'"
-      size="small"
-      @change="changeVal"
-      change-on-select
-    ></el-cascader>
+    <el-cascader placeholder="请选择" :options="options" v-model="value" :props="props" filterable :style="isWidth ? '' : 'width:160px;'" size="small"
+      @change="changeVal" change-on-select></el-cascader>
   </div>
 </template>
 <script>
-import {mapGetters} from 'vuex';
-import { getEqCode } from "@/api/scan/request";
+import { mapGetters } from 'vuex';
+import { getEquipBelongs, queryEquip } from "@/api/scan/request";
 export default {
   name: "getCode",
   props: {
@@ -24,15 +15,13 @@ export default {
       type: Boolean,
       default: true
     },
-    isAll: {
+    all: {
       type: Boolean,
       default: false,
     }
   },
-    computed: {
-        ...mapGetters("layout", [
-            "projectId",
-        ])
+  computed: {
+    ...mapGetters("layout", ["projectId"])
   },
   data() {
     return {
@@ -50,10 +39,10 @@ export default {
     this.getData();
   },
   watch: {
-      projectId() {
-          this.value = [''];
-          this.getData();
-      }
+    projectId() {
+      this.value = [''];
+      this.getData();
+    }
   },
   methods: {
     setValue(val) {
@@ -70,66 +59,71 @@ export default {
       this.value = val
       this.$emit("change", value)
     },
-    async getData() {
-      await getEqCode().then(res => {
-        if (this.isAll) {
-          let data = this.changeArr(res.data.Content)
-          data.unshift({
-            code: "all",
-            facility: "全部"
-          });
-          this.options = data
-          this.value = ["all"]
-        } else {
-          this.options = this.changeArr(res.data.Content);
+    //获取当前项目下的设备类型(只拿到编码-需要过滤)
+    getData() {
+      let param2 = {
+        Distinct: true,
+        PageNumber: 1,
+        PageSize: 500,
+        Projection: [
+          "Category"
+        ]
+      }
+      let param1 = {
+        data: {
+          Distinct: true,
+          Orders: "EquipName asc",
+          PageNumber: 1,
+          PageSize: 500,
+          Projection: [
+            "EquipCode", "EquipName"
+          ]
         }
-        if (!!this.value && this.value.length) {
-          let value = {}
-          this.options.map(item => {
-            if (item.code == this.value[0]) {
-              value = item
-            }
-          })
-          this.$emit("change", value)
+      }
+      let promise2 = new Promise((resolve, reject) => {
+        queryEquip(param2, res => {
+          resolve(res)
+        })
+      })
+      let promise1 = new Promise((resolve, reject) => {
+        getEquipBelongs(param1, res => {
+          resolve(res)
+        })
+      })
+      Promise.all([promise1,promise2]).then((res) => {
+        let allData = res[0], data = res[1]
+        this.options = this.formatOptions(allData.Content)
+        if (this.value) {
+          this.changeVal(this.value)
         }
-        if (!this.falg) {
-          this.changeList()
+        if(!this.all) {
+          this.content = data.Content.map(t => {
+            return t.Category
+          });
+          this.filterForOptions();
+          if (this.value) {
+            this.changeVal(this.value)
+          }
         }
-      });
+      })
     },
-    changeArr(arr) {
+    //格式化options数据
+    formatOptions(arr) {
       let data = [];
-      arr.map(item => {
-        if (item.content && item.content.length) {
-          data = data.concat(this.changeArr(item.content))
-        } else {
-          data.push(item)
-        }
-      });
+      arr.map(t => {
+        let temp = {};
+        temp.code = t.EquipCode;
+        temp.facility = t.EquipName;
+        data.push(temp)
+      })
       return data;
     },
-
-    pushData(content) {
-      this.content = content
-      if (this.options.length) {
-        this.falg = true
-        this.changeList()
-      } else {
-        this.falg = false
-      }
-    },
-
-    changeList() {
+    //过滤
+    filterForOptions() {
       this.options = this.options.filter(item => {
         if (this.content.indexOf(item.code) > -1) {
           return item
         }
-        // item.disabled = true
-        // this.content.map(child => {
-        //   if (item.code == child) {
-        //     item.disabled = false
-        //   }
-        // })
       })
     }
   }

+ 1 - 5
src/components/ledger/lib/cenoteType.vue

@@ -50,11 +50,7 @@ export default {
     },
     async getData() {
       let param = {
-        ProjId: this.projectId,
-        secret: this.secret,
-        data: {
-          ProjectId: this.projectId
-        }
+        ProjectId: this.projectId
       }
       await getCenoteType (param, res => {
         var data = res.Content;

+ 72 - 55
src/components/ledger/lib/floorCascader.vue

@@ -1,12 +1,12 @@
 <template>
     <div id="buildFloor">
-        <span class="buildFloor" style="margin-right: 12px;">所属建筑楼层</span>
+        <span class="buildFloor" style="margin-right: 12px;">建筑楼层</span>
         <el-cascader placeholder="请选择建筑楼层" :options="options" v-model="value" filterable size="small" :style="isWidth ? '' : 'width:160px;'" @change="changeCascader"></el-cascader>
     </div>
 </template>
 <script>
     import tools from "@/utils/scan/tools"
-    import { getSpaceFloor } from '@/api/scan/request'
+    import { floorQuery, buildingQuery } from '@/api/scan/request'
     import { mapGetters, mapActions } from "vuex"
 
     export default {
@@ -53,64 +53,80 @@
             }
         },
         methods: {
+            //设置默认选项
+            setValue(val) {
+                if (val && val.length) {
+                    this.value = val
+                }
+            },
             //获取数据
             getData() {
-                getSpaceFloor(this.param).then(res => {
-                    if (res.data.Result == 'success') {
-                        let data = this.changeArr(res.data.Content)
-                        console.log(data)
-                        data.unshift({
-                            value: "all",
-                            label: "全部"
-                        }, {
-                            value: "noKnow",
-                            label: "未明确建筑的设备"
-                        })
-                        data.map(item => {
-                            if (!!item.children) {
-                                item.children = tools.sortArr(item.children, "FloorSequenceID", false) //对楼层排序
-                                item.children.unshift({
-                                    value: 'noKnow',
-                                    label: "未明确楼层的设备"
-                                })
-                                item.children.unshift({
-                                    value: "all",
-                                    label: "全部"
-                                })
-                            }
-                            return item
-                        })
-                        this.options = data
-                    } else {
-                        this.$message.error(res.data.ResultMsg)
-                    }
-                }).catch(() => {
-                    this.$message.error("请求出错")
+                let data, buildParams = {
+                    PageNumber: 1,
+                    PageSize: 500,
+                    Projection: [
+                        "BuildID",
+                        "BuildLocalName"
+                    ]
+                }, floorParams = {
+                    Orders: "FloorSequenceID desc",
+                    PageNumber: 1,
+                    PageSize: 500,
+                    Projection: [
+                        "BuildID",
+                        "FloorID",
+                        "FloorLocalName",
+                        "FloorSequenceID"
+                    ]
+                }
+                let promise1 = new Promise((resolve, reject) => {
+                    buildingQuery(buildParams, res => {
+                        resolve(res)
+                    })
                 })
-            },
-            //将数组转换成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
-                                }
-                            })
-                        }
-                    } else {
+                let promise2 = new Promise((resolve, reject) => {
+                    floorQuery(floorParams, res => {
+                        resolve(res)
+                    })
+                })
+                Promise.all([promise1, promise2]).then(values => {
+                    let builData = values[0].Content, floorData = values[1].Content
+                    data = builData.map(build => {
                         return {
-                            value: item.id,
-                            label: item.infos.BuildLocalName,
-                            children: null,
-                            isChilren: 1,
+                            value: build.BuildID,
+                            label: build.BuildLocalName
                         }
-                    }
+                    })
+                    data.unshift({
+                        value: "all",
+                        label: "全部"
+                    }, {
+                        value: "noKnow",
+                        label: "未明确建筑的设备"
+                    })
+                    data.forEach(build => {
+                        floorData.forEach(floor => {
+                            if (build.value == floor.BuildID && floor.FloorID && floor.FloorLocalName && this.type == "yes") {
+                                if (build.children) {
+                                    build.children.push({
+                                        value: floor.FloorID,
+                                        label: floor.FloorLocalName,
+                                        FloorSequenceID: floor.FloorSequenceID
+                                    })
+                                } else {
+                                    build.children = []
+                                    build.children.push({
+                                        value: "all",
+                                        label: "全部"
+                                    },{
+                                        value: 'noKnow',
+                                        label: "未明确楼层的设备"
+                                    })
+                                }
+                            }
+                        })
+                    })
+                    this.options = data
                 })
             },
             //改变item
@@ -122,6 +138,7 @@
 </script>
 <style lang="less" scoped>
     #buildFloor {
+        margin-left: 10px;
         float: left;
         .buildFloor {
             color: #999999;

+ 141 - 0
src/components/ledger/lib/partsDieList.vue

@@ -0,0 +1,141 @@
+<template>
+  <div id="cascaderMap">
+    <span class="buildFloor" style="margin-right: 12px;">设备类</span>
+    <el-cascader placeholder="请选择" :options="options" v-model="value" :props="props" filterable :style="isWidth ? '' : 'width:160px;'" size="small"
+      @change="changeVal" change-on-select></el-cascader>
+  </div>
+</template>
+<script>
+import { mapGetters } from 'vuex';
+import { getEqCode, getEquipBelongs, queryPartsDie } from "@/api/scan/request";
+export default {
+  name: "getCode",
+  props: {
+    isWidth: {
+      type: Boolean,
+      default: true
+    },
+    Family: {
+      type: String,
+      default: '',
+    }
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  data() {
+    return {
+      value: [""],
+      options: [],
+      props: {
+        value: "code",
+        label: "facility"
+      },
+      falg: true,
+      content: []
+    };
+  },
+  mounted() {
+    if(this.Family != "") {
+      this.getAllData()
+    }
+  },
+  watch: {
+    projectId() {
+      this.value = [''];
+      this.getAllData()
+    }
+    // Family: {
+    //   handler: function (val) {
+    //     if(val != "") {
+    //       this.getAllData()
+    //     }
+    //   },
+    //   immediate: true
+    // }
+  },
+  methods: {
+    setValue(val) {
+      if (val && val.length) {
+        this.value = val
+      }
+    },
+    //修改val
+    changeVal(val) {
+      let value = {}
+      this.options.map(item => {
+        if (item.code == val) {
+          value = item
+        }
+      })
+      this.value = val
+      this.$emit("change", value)
+    },
+    //获取当前项目下的设备类型(只拿到编码-需要过滤)
+    getData() {
+      let param = {
+        Distinct: true,
+        PageNumber: 1,
+        PageSize: 500,
+        Projection: [
+          "Category"
+        ]
+      }
+      queryPartsDie(param, res => {
+        this.content = res.Content
+        this.filterForOptions()
+        let val = this.options.length?[this.options[0].code]:[""]
+        this.changeVal(val)
+      })
+    },
+    //获取物理世界所有设备类型
+    getAllData() {
+      let param = {
+        data: {
+          Filters: `Family='${this.Family}'`,
+          Distinct: true,
+          Orders: "EquipName asc",
+          PageNumber: 1,
+          PageSize: 500,
+          Projection: [
+            "EquipCode", "EquipName"
+          ]
+        }
+      }
+      getEquipBelongs(param, res => {
+        this.options = this.formatOptions(res.Content)
+        this.getData()
+      })
+    },
+    //格式化options数据
+    formatOptions(arr) {
+      let data = [];
+      arr.map(t => {
+        let temp = {};
+        temp.code = t.EquipCode;
+        temp.facility = t.EquipName;
+        data.push(temp)
+      })
+      return data;
+    },
+    //过滤
+    filterForOptions() {
+      this.options = this.options.filter(item => {
+        if (this.content.find(value => value.Category == item.code)) {
+          return item
+        }
+      })
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+#cascaderMap {
+  float: left;
+  margin-left: 10px;
+  .buildFloor {
+    color: #999999;
+    font-size: 14px;
+  }
+}
+</style>

+ 1 - 3
src/components/ledger/lib/qrcode.vue

@@ -36,9 +36,7 @@ export default {
   data() {
     return {};
   },
-  created() {
-    console.log(this.qrcodeUrl)
-   },
+  created() {},
   mounted() {
   },
   methods: {

+ 46 - 70
src/components/ledger/lib/system.vue

@@ -1,56 +1,50 @@
 <template>
   <div id="cascaderMap">
     <span class="buildFloor" style="padding-right: 12px;">所属专业系统类型</span>
-    <el-cascader
-      placeholder="请选择"
-      :options="options"
-      v-model="value"
-      :props="props"
-      filterable
-      :style="isWidth ? '' : 'width:160px;'"
-      size="small"
-      @change="changeVal"
-      change-on-select
-    ></el-cascader>
+    <el-cascader placeholder="请选择" :options="options" v-model="value" :props="props" filterable :style="isWidth ? '' : 'width:160px;'" size="small"
+      @change="changeVal" change-on-select></el-cascader>
   </div>
 </template>
 <script>
-import {mapGetters} from 'vuex';
-import { getEqCode } from "@/api/scan/request";
-import tools from "@/utils/tools";
+import { mapGetters } from 'vuex';
+import { queryLinkSys, getEqCode } from "@/api/scan/request";
 export default {
   name: "getCode",
   props: {
     isWidth: {
       type: Boolean,
       default: true
+    },
+    all:{
+      default:false
     }
   },
-        computed: {
-        ...mapGetters("layout", [
-            "projectId",
-        ])
+  computed: {
+    ...mapGetters("layout", ["projectId"])
   },
   data() {
     return {
       value: [],
       options: [],
       props: {
-        value: "code",
-        label: "facility"
-      },
-      falg: true,
-      content: [],
-      alloptions:[]
+        value: "Category",
+        label: "CategoryName"
+      }
     };
   },
   created() {
-    this.getData();
+    if(this.all){
+      //物理世界所有系统
+      this.getAllData();
+    }else{
+      //当前项目下已有的系统
+      this.getData();
+    }
   },
-      watch: {
-      projectId() {
-          this.value = ['']
-      }
+  watch: {
+    projectId() {
+      this.value = ['']
+    }
   },
   methods: {
     setValue(val) {
@@ -60,65 +54,47 @@ export default {
     changeVal(val) {
       let value = {}
       this.options.map(item => {
-        if (item.code == val) {
+        if (item.Category == val) {
           value = item
         }
       })
+      this.value = val
       this.$emit("change", value)
     },
     getData() {
-      getEqCode().then(res => {
-        this.alloptions = this.changeArr(res.data.Content);
-        this.options = tools.deepCopy(this.alloptions);
-        if (!!this.value && this.value.length) {
-          let value = {}
-          this.options.map(item => {
-            if (item.code == this.value[0]) {
-              value = item
-            }
-          })
-          this.$emit("change", value)
+      let param = {
+        Distinct: true,
+        PageNumber: 1,
+        PageSize: 500,
+        Projection: [
+          "Category", "CategoryName"
+        ]
+      }
+      queryLinkSys(param, res => {
+        this.options = res.Content;
+        if (this.value) {
+          this.changeVal(this.value)
         }
-        if (!this.falg) {
-          this.changeList()
+      })
+    },
+    getAllData(){
+      getEqCode().then(res => {
+        this.options = this.changeArr(res.data.Content)
+        if (this.value) {
+          this.changeVal(this.value)
         }
-      });
+      })
     },
     changeArr(arr) {
       let data = [];
       arr.map(item => {
         if (item.content && item.content.length) {
           return item.content.map(children => {
-            data.push({ code: children.code, facility: children.system });
+            data.push({ Category: children.code, CategoryName: children.system });
           });
         }
       });
       return data;
-    },
-    //上级页面传入content
-    pushData(content) {
-      this.content = content
-      if (this.options.length) {
-        this.falg = true
-        this.changeList()
-      } else {
-        this.falg = false
-      }
-    },
-
-    //修改list
-    changeList() {
-      this.options = this.alloptions.filter(item => {
-        if (this.content.indexOf(item.code) > -1) {
-          return item
-        }
-        // item.disabled = true
-        // this.content.map(child => {
-        //   if (item.code == child) {
-        //     item.disabled = false
-        //   }
-        // })
-      })
     }
   }
 };

+ 12 - 7
src/components/ledger/lib/uploadImgs.vue

@@ -118,7 +118,6 @@ export default {
       // 寻找表单域中的 <input type="file" ... /> 标签
       // var file = form["file"].files[0];
 
-      console.log("lalala", item)
       let file = item.file;
       // try sending
       let reader = new FileReader();
@@ -163,14 +162,20 @@ export default {
             if (xhr.readyState == 4) {
               if (xhr.status == 200) {
                 if (vm.type == 'image') {
-                  vm.imagesArr.push(
-                    uploadKey + "." + type
-                  );
+                  vm.imagesArr.push({
+                    name: uploadKey + '',
+                    key: uploadKey + "." + type,
+                    systemId: "dataPlatform",
+                    type: "image"
+                  });
                 }
                 if (type == 'mp4') {
-                  vm.imagesArr.push(
-                    uploadKey + "." + type
-                  );
+                  vm.imagesArr.push({
+                    name: uploadKey + '',
+                    key: uploadKey + "." + type,
+                    systemId: "dataPlatform",
+                    type: "video"
+                  });
                   vm.creatImg(vm.imageGetUrl + "&key=" + uploadKey + "." + type, uploadKey)
                 }
                 console.log(vm.type, type)

+ 3 - 4
src/components/ledger/lib/uploadImgsName.vue

@@ -146,7 +146,6 @@ export default {
       // 寻找表单域中的 <input type="file" ... /> 标签
       // var file = form["file"].files[0];
 
-      console.log("lalala", item)
       let file = item.file;
       // try sending
       let reader = new FileReader();
@@ -193,7 +192,7 @@ export default {
                 if (vm.type == 'image') {
                   vm.imagesArr.push(
                     {
-                      name: uploadKey,
+                      name: uploadKey + '',
                       key: uploadKey + "." + type,
                       systemId: "dataPlatform",
                       type: "image"
@@ -202,7 +201,7 @@ export default {
                 }
                 if (type == 'mp4') {
                   vm.imagesArr.push({
-                    name: uploadKey,
+                    name: uploadKey + '',
                     key: uploadKey + "." + type,
                     systemId: "dataPlatform",
                     type: "video"
@@ -212,7 +211,7 @@ export default {
                 }
                 if (vm.type == "video" && type == "png") {
                   vm.videoPicArr.push({
-                    name: uploadKey,
+                    name: uploadKey + '',
                     key: uploadKey + "." + type,
                     systemId: "dataPlatform",
                     type: "image_video"

+ 155 - 253
src/components/ledger/tableTransfers.vue

@@ -6,106 +6,61 @@
         <div class="border-view">
           <div class="search">
             <div class="search-small" style="padding: 10px 10px 0 10px">
-              <el-input
-                placeholder="输入设备名称进行查询"
-                v-model="search.filter"
-                style="width:300px;margin-right: 10px;"
-                size="small"
-                clearable
-              ></el-input>
+              <el-input placeholder="输入设备名称进行查询" v-model="search1" style="width:300px;margin-right: 10px;" size="small" clearable></el-input>
               <el-button @click="getLeftData" size="small">查找</el-button>
             </div>
             <div class="search-small" style="padding: 10px">
-              <floor-cascader :isWidth="false"></floor-cascader>
-              <cascader :isWidth="false" @change="changeCascader" :isAll="true"></cascader>
+              <floor-cascader :isWidth="false" @change="changeBuild"></floor-cascader>
+              <cascader :isWidth="false" @change="changeCascader" :all="true"></cascader>
             </div>
           </div>
-          <el-table
-            ref="multipleTable"
-            :data="tableData"
-            height="300px"
-            tooltip-effect="dark"
-            style="width: 100%"
-            class="data-table"
-            @selection-change="handleSelectionChange"
-            v-loading="isLoading1"
-            border
-          >
+          <el-table ref="multipleTable" :data="tableData" height="300px" tooltip-effect="dark" style="width: 100%" class="data-table"
+            @selection-change="handleSelectionChange" v-loading="isLoading1" border>
             <el-table-column type="selection" width="55"></el-table-column>
             <el-table-column label="设备名称" width="120">
-              <template
-                slot-scope="scope"
-              >{{ scope.row.infos.EquipLocalName || scope.row.infos.EquipName }}</template>
+              <template slot-scope="scope">{{ scope.row.EquipLocalName || scope.row.EquipName }}</template>
             </el-table-column>
             <el-table-column label="设备编号" width="120">
-              <template slot-scope="scope">{{ scope.row.infos.EquipLocalID || "--" }}</template>
+              <template slot-scope="scope">{{ scope.row.EquipLocalID || "--" }}</template>
             </el-table-column>
             <el-table-column label="设备类" show-overflow-tooltip>
-              <template slot-scope="scope">{{ getName(scope.row.category) }}</template>
+              <template slot-scope="scope">{{ getName(scope.row.Category) }}</template>
             </el-table-column>
             <el-table-column prop="address" label="安装位置" show-overflow-tooltip>
-              <template slot-scope="scope">{{ scope.row.infos.InstallLocation || "--" }}</template>
+              <template slot-scope="scope">{{ scope.row.InstallLocation || "--" }}</template>
             </el-table-column>
           </el-table>
           <div class="right">
-              <my-pagination @change="changePages1" :page="pages1"></my-pagination>
+            <my-pagination @change="changePages1" :page="pages1"></my-pagination>
           </div>
         </div>
       </div>
       <div class="main-button">
-        <el-button
-          class="top"
-          @click="rightToLeft"
-          :disabled="SelectionList && SelectionList.length ? false : true"
-          :type="SelectionList && SelectionList.length ? 'primary' : ''"
-          icon="el-icon-arrow-left"
-          circle
-        ></el-button>
-        <el-button
-          class="bottom"
-          @click="leftToRight"
-          :disabled="multipleSelection && multipleSelection.length ? false : true"
-          :type="multipleSelection && multipleSelection.length ? 'primary' : ''"
-          icon="el-icon-arrow-right"
-          circle
-        ></el-button>
+        <el-button class="top" @click="rightToLeft" :disabled="SelectionList && SelectionList.length ? false : true"
+          :type="SelectionList && SelectionList.length ? 'primary' : ''" icon="el-icon-arrow-left" circle></el-button>
+        <el-button class="bottom" @click="leftToRight" :disabled="multipleSelection && multipleSelection.length ? false : true"
+          :type="multipleSelection && multipleSelection.length ? 'primary' : ''" icon="el-icon-arrow-right" circle></el-button>
       </div>
       <div class="main-right">
         <h4>已关联该系统的设备</h4>
         <div class="border-view">
           <div class="search">
             <div class="search-big">
-              <el-input
-                placeholder="输入设备名称、设备类名称进行查询"
-                v-model="search2.filter"
-                style="width:200px; margin-bottom: 10px;"
-                size="small"
-                clearable
-              ></el-input>
+              <el-input placeholder="输入设备名称进行查询" v-model="search2" style="width:200px; margin-bottom: 10px;" size="small" clearable>
+              </el-input>
               <el-button @click="getRightData" size="small">查找</el-button>
             </div>
           </div>
-          <el-table
-            ref="multipleTable"
-            :data="table2Data"
-            height="300px"
-            tooltip-effect="dark"
-            style="width: 100%"
-            class="data-table"
-            @selection-change="tableChange"
-            v-loading="isLoading2"
-            border
-          >
+          <el-table ref="multipleTable" :data="table2Data" height="300px" tooltip-effect="dark" style="width: 100%" class="data-table"
+            @selection-change="tableChange" v-loading="isLoading2" border>
             <el-table-column type="selection" width="55"></el-table-column>
             <el-table-column label="设备名称">
-              <template
-                slot-scope="scope"
-              >{{ scope.row.infos.EquipLocalName || scope.row.infos.EquipName }}</template>
+              <template slot-scope="scope">{{ scope.row.EquipLocalName || scope.row.EquipName }}</template>
             </el-table-column>
           </el-table>
-            <div class="right">
-                <my-pagination :page="pages2" @change="changePages2" :isSmall="false"></my-pagination>
-            </div>
+          <div class="right">
+            <my-pagination :page="pages2" @change="changePages2" :isSmall="false"></my-pagination>
+          </div>
         </div>
       </div>
     </div>
@@ -116,11 +71,16 @@ import myPagination from "@/components/common/myPagination";
 import floorCascader from "@/components/ledger/lib/floorCascader";
 import cascader from "@/components/ledger/lib/cascader";
 
-import { getBillEquipList, getEqCode, getBussines, deleteRelation, getGraphyId, getSysToEq, createRelation } from "@/api/scan/request"
 import {
-        mapGetters,
-        mapActions
-    } from "vuex";
+  getEquipNotInSys,
+  getEquipInSys,
+  getEquipBelongs,
+  sysLinkEquip
+} from "@/api/scan/request"
+import {
+  mapGetters,
+  mapActions
+} from "vuex";
 export default {
   props: {
     dialog: {
@@ -141,12 +101,8 @@ export default {
     cascader
   },
   computed: {
-            ...mapGetters("layout", [
-                "projectId",
-                "secret",
-                "userId"
-            ])
-        },
+    ...mapGetters("layout", ["projectId", "secret", "userId"])
+  },
   data() {
     return {
       dialogVisible: true,
@@ -162,30 +118,22 @@ export default {
         total: 0,
         currentPage: 1
       },
-      search: {//第一个table的搜索条件
-        filter: "",//文本框条件
-        build: "all",//建筑
-        floor: "",//楼层
-        category: "all"//设备类别
-      },
-      search2: {//第二个搜索条件
-        filter: "",//搜索文案
-      },
-      tableData: [
-      ], //第一个表格的数据
-      table2Data: [
-      ], //第二个表格的数据
+      search1: '', //左侧输条件
+      search2: '',//右侧输入条件
+      buildingId: '',//建筑id
+      floorId: '',//楼层id
+      category: '',//设备类型 
+      tableData: [], //第一个表格的数据
+      table2Data: [], //第二个表格的数据
       multipleSelection: [], //第一个表格的被选择数组
       SelectionList: [], //第二个表格的被选择数组
-      list: [],
-      graphyId: "",
+      List: [],
       isLoading1: false,
       isLoading2: false,
     };
   },
   created() {
-    this.getData();
-    this.getgraphyId();
+    this.getAllData();
   },
   methods: {
     //关闭
@@ -193,52 +141,51 @@ export default {
       this.$emit("close")
       done()
     },
-    getgraphyId() {
-      getGraphyId({
-        type: "SystemEquip",
-        secret: this.secret,
-        ProjId: this.projectId
-      }).then(res => {
-        if (res.data.Result == "success") {
-          this.graphyId = res.data.graph_id
-        } else {
-          this.$message.error("请求失败:" + res.data.ResultMsg)
-        }
-      }).catch(_ => [
-        this.$message.error("请求失败")
-      ])
-    },
+    //根据设备类型编码获取名称
     getName(code) {
-      code = code.substring(2, 6)
       let str = ""
-      this.list.map(item => {
+      this.List.map(item => {
         if (item.code == code) {
           str = item.facility
         }
       })
       return str
     },
-    getData() {
-      getEqCode().then(res => {
-        this.list = this.changeArr(res.data.Content)
-      });
+    //获取物理世界所有设备类型
+    getAllData() {
+      let param = {
+        data: {
+          Distinct: true,
+          Orders: "EquipName asc",
+          PageNumber: 1,
+          PageSize: 500,
+          Projection: [
+            "EquipCode", "EquipName"
+          ]
+        }
+      }
+      getEquipBelongs(param, res => {
+        this.List = this.formatOptions(res.Content)
+      })
     },
-    //修改
-    changeArr(arr) {
+    //格式化List数据
+    formatOptions(arr) {
       let data = [];
-      arr.map(item => {
-        if (item.content && item.content.length) {
-          return item.content.map(children => {
-            if (children.content && children.content.length) {
-              return children.content.map(i => {
-                data.push(i);
-              });
-            }
-          });
-        }
-      });
+      arr.map(t => {
+        let temp = {};
+        temp.code = t.EquipCode;
+        temp.facility = t.EquipName;
+        data.push(temp)
+      })
       return data;
     },
+    //获取两侧数据
+    getAllTable() {
+      this.pages1.currentPage = 1
+      this.pages2.currentPage = 1
+      this.getLeftData()
+      this.getRightData()
+    },
     //pages1改变
     changePages1() {
       this.getLeftData()
@@ -246,173 +193,128 @@ export default {
     changePages2() {
       this.getRightData()
     },
+    //修改设备类型
     changeCascader(val) {
-      this.search.category = val.code
+      this.category = val.code
       this.getLeftData()
     },
-    getAllData() {
-      console.log(this.id)
-      this.getLeftData()
-      this.getRightData()
-    },
-
+    //获取未关联该系统的设备
     getLeftData() {
       this.isLoading1 = true
       let param = {
         data: {
-          "limit": {        // 分页查询, 选填.
-            "skip": this.pages1.size * (this.pages1.currentPage - 1),  // 跳过多少数据
-            "count": this.pages1.size   // 查询跳过300条数据之后的50条 (默认按照创建时间从大-->小排序)
-          },
-          id: "",
-          excludeSystemId: this.id,
-          type: [this.search.category == "all" ? "Eq" : this.search.category]
+          Filters: '',
+          Orders: "EquipID desc",
+          PageNumber: this.pages1.currentPage,
+          PageSize: this.pages1.size
         },
-        secret: this.secret,
-        ProjId: this.projectId
+        sysId: this.id
+      }
+      if (this.search1 != '') {
+        param.data.Filters = `EquipLocalName contain "${this.search1}";`
       }
-      if (this.search.filter) {
-        param.data.filter = {}
-        param.data.filter.EquipLocalName = this.search.filter == ""
+      //建筑id
+      if (this.buildingId == "noKnow") {
+        param.data.Filters += `buildingId isNull;`
+      } else if (this.buildingId && this.buildingId != "all") {
+        param.data.Filters += `buildingId='${this.buildingId}';`
       }
-      if (this.search.build == "all") {
-        param.data.id = this.projectId
-      } else if (this.search.floor && this.search.floor != "all") {
-        param.data.id = this.search.floor
-      } else if (this.search.floor == 'all') {
-        param.data.id = this.search.build
+      //楼层id
+      if (this.floorId == "noKnow") {
+        param.data.Filters += `floorId isNull;`
+      } else if (this.floorId && this.floorId != "all") {
+        param.data.Filters += `floorId='${this.floorId}';`
+      }
+      //设备类型
+      if (this.category) {
+        param.data.Filters += `category='${this.category}';`
+      }
+      if (param.data.Filters) {
+        param.data.Filters = param.data.Filters.substring(0, param.data.Filters.length - 1)
       } else {
-        param.data.id = this.search.ProjId
+        delete param.data.Filters;
       }
-      getBillEquipList(param, res => {
+      getEquipNotInSys(param, res => {
         this.tableData = res.Content
-        this.pages1.total = res.TotalCount
+        this.pages1.total = res.Total
         this.isLoading1 = false
       })
     },
-
+    //获取已关联该系统的设备
     getRightData() {
       this.isLoading2 = true
       let param = {
-        data: {
-          "limit": {        // 分页查询, 选填.
-            "skip": this.pages2.size * (this.pages2.currentPage - 1),  // 跳过多少数据
-            "count": this.pages2.size   // 查询跳过300条数据之后的50条 (默认按照创建时间从大-->小排序)
-          },
-          filter: {
-            EquipLocalName: this.search2.filter
-          },
-          criteria: {
-            fromId: this.id,
-            graphType: "SystemEquip",
-            relType: "1",
-            side: "toId",
-            type: ["Eq"]
-          }
-        },
-        secret: this.secret,
-        ProjId: this.projectId
+        Filters: `sysId='${this.id}'`,
+        Orders: "EquipID desc",
+        PageNumber: this.pages1.currentPage,
+        PageSize: this.pages1.size
       }
-      getSysToEq(param, res => {
+      if (this.search2 != '') {
+        param.Filters += `;EquipLocalName contain "${this.search2}"`
+      }
+      getEquipInSys(param, res => {
         this.table2Data = res.Content
-        this.pages2.total = res.TotalCount
+        this.pages2.total = res.Total
         this.isLoading2 = false
       })
     },
-
-    getList() {
-
-    },
-
     //左侧多选框改变
     handleSelectionChange(val) {
-      this.multipleSelection = val;
+      this.multipleSelection = val
     },
-
-    //多选框发生改变
+    //右侧多选框发生改变
     tableChange(val) {
       this.SelectionList = val;
     },
-
     //关联
     leftToRight() {
-      let param = {
-        data: {
-          criterias: []
-        },
-        secret: this.secret,
-        ProjId: this.projectId
-      }
-      this.multipleSelection.map(item => {
-        param.data.criterias.push({
-          from_id: this.id,
-          to_id: item.id,
-          graph_id: this.graphyId,
-          rel_type: "1",
-          infos: null
-        })
-      })
-      createRelation(param).then(res => {
-        if (res.data.Result == "success") {
-          this.$message.success("关联成功")
-          this.getAllData()
-        } else {
-          this.$message.error("请求失败:" + res.data.ResultMsg)
-        }
-      }).catch(_ => {
-        this.$message.error("请求失败")
+      let relationList = this.multipleSelection.concat(this.table2Data)
+      relationList = relationList.map(t => {
+        return t.EquipID || t.EquipId
       })
+      this.relationChange(relationList)
     },
-
     //取消关联
     rightToLeft() {
+      let relationList = [];
+      let tempIDs = this.SelectionList.map(t => {
+        return t.EquipId
+      })
+      this.table2Data.map(t => {
+        if (tempIDs.indexOf(t.EquipId) < 0) {
+          relationList.push(t.EquipId)
+        }
+      })
+      this.relationChange(relationList)
+    },
+    //更新设备 系统关系
+    relationChange(arr) {
       let param = {
-        data: {
-          criterias: []
-        },
-        secret: this.secret,
-        ProjId: this.projectId
+        SysID: this.id,
+        EquipIdList: arr
       }
-      this.SelectionList.map(item => {
-        param.data.criterias.push({
-          from_id: this.id,
-          to_id: item.id,
-          graph_id: this.graphyId,
-          rel_type: "1"
-        })
+      sysLinkEquip(param, res => {
+        this.$message.success('修改关联关系成功')
+        this.getAllTable()
       })
-
-      if (!!this.id) {
-        deleteRelation(param).then(res => {
-          if (res.data.Result == "success") {
-            this.$message.success("取消关联成功")
-            this.getAllData()
-          } else {
-            this.$message.error("请求失败:" + res.data.ResultMsg)
-          }
-        }).catch(_ => {
-          this.$message.error("请求失败")
-        })
-      } else {
-        this.$message.error("id为空")
+    },
+    //修改楼层
+    changeBuild(val) {
+      this.buildingId = val[0]
+      if (val[1]) {
+        this.floorId = val[1]
       }
-    }
+      this.getLeftData()
+    },
   },
   watch: {
     dialog: {
       deep: true,
       handler: function () {
         if (this.dialog.relevance) {
-          this.search = {//第一个table的搜索条件
-            filter: "",//文本框条件
-            build: "all",//建筑
-            floor: "",//楼层
-            category: "all"//设备类别
-          }
-          this.search2 = {//第二个搜索条件
-            filter: "",//搜索文案
-          }
-          this.getAllData()
+          this.search1 = ''
+          this.search2 = ''
+          this.getAllTable()
         }
       }
     }
@@ -421,21 +323,21 @@ export default {
 </script>
 <style lang="less">
 #tableTransfers {
-    height: 500px;
+  height: 500px;
   width: 100%;
   overflow-x: hidden;
-  overflow-y: auto; 
+  overflow-y: auto;
   h4 {
     font-size: 20px;
     font-weight: 500;
   }
   .search {
     .search-small {
-        overflow: hidden;
+      overflow: hidden;
     }
     border-bottom: #dcdfe6 1px solid;
     .search-big {
-        padding: 10px;
+      padding: 10px;
     }
   }
   .main-left {

+ 177 - 0
src/components/point/dynamicdata/applyRulesDialog.vue

@@ -0,0 +1,177 @@
+<template>
+  <el-dialog title="提示" :visible.sync="dialogVisible" width="60%" @close="handleClose" id="applyRules">
+    <span>对应规则有冲突,请处理</span>
+    <el-tabs v-model="activeName" @tab-click="handleClick">
+      <el-tab-pane label="人工填写过表号功能号" name="first"></el-tab-pane>
+      <!-- <el-tab-pane label="多个标识对应同一个信息点" name="second"></el-tab-pane> -->
+    </el-tabs>
+    <el-table :data="tableData" style="width: 100%;max-height:400px;min-height:200px;" height="calc(100% - 160px)" @expand-change="expandRow" ref="expandTable">
+      <el-table-column type="expand" class-name="bgf5">
+        <template slot-scope="scope">
+          <el-row>
+            <el-col :span="12">
+              <p>{{scope.row.BuildLocalName}}-{{scope.row.FloorLocalName}}</p>
+              <p>{{scope.row.RoomLocalName}}</p>
+              <p>{{scope.row.SubTypeName}}</p>
+            </el-col>
+            <el-col :span="6">
+              <p>{{scope.row.OldMsg.Description}}</p>
+              <p>
+                {{scope.row.OldMsg.EquipmentMark}}
+                {{scope.row.OldMsg.KeyEquipmentType}}
+                {{scope.row.OldMsg.KeyEquipmentParameter}}
+              </p>
+              <p>{{scope.row.OldMsg.LocationFlag&&scope.row.OldMsg.LocationFlag.toString()}}</p>
+            </el-col>
+            <el-col :span="6">
+              <p>{{scope.row.NewMsg.Description}}</p>
+              <p>
+                {{scope.row.NewMsg.EquipmentMark}}
+                {{scope.row.NewMsg.KeyEquipmentType}}
+                {{scope.row.NewMsg.KeyEquipmentParameter}}
+              </p>
+              <p>{{scope.row.NewMsg.LocationFlag&&scope.row.NewMsg.LocationFlag.toString()}}</p>
+            </el-col>
+          </el-row>
+        </template>
+      </el-table-column>
+      <el-table-column label="设备实例本地名(本地编码)" class-name="bgf5" align="center">
+        <template slot-scope="scope">
+          {{scope.row.EquipLocalName}}({{scope.row.ObjectID}})
+        </template>
+      </el-table-column>
+      <el-table-column label="信息点" prop="InfomationPoint" align="center"></el-table-column>
+      <el-table-column label="原值" prop="Old" align="center">
+        <template slot-scope="scope">
+          <el-radio v-model="scope.row.checked" label="Old">{{scope.row.Old}}</el-radio>
+        </template>
+      </el-table-column>
+      <el-table-column label="新值" prop="New" align="center">
+        <template slot-scope="scope">
+          <el-radio v-model="scope.row.checked" label="New">{{scope.row.New}}</el-radio>
+        </template>
+      </el-table-column>
+    </el-table>
+    <span slot="footer" class="dialog-footer">
+      <span style="font-size:12px;color:red;" v-show="finished">请处理所有冲突</span>
+      <el-button size="small">取消</el-button>
+      <el-button size="small" type="primary" @click="userSelected">使用选择的表号功能号</el-button>
+    </span>
+  </el-dialog>
+</template>
+<script>
+
+import {
+  dynamicPromptobjs, //提示冲突
+  dynamicClashConfirm, //冲突选择确认
+  dynamicQueryPoint, //查点位
+  dynamicExecute, //执行规则
+} from "@/api/scan/request";
+import Vue from 'vue'
+export default {
+  data() {
+    return {
+      dialogVisible: false, //弹窗显示与隐藏
+      tableData: [],
+      activeName: "first", //当前所在tab页
+      finished: false, //未处理所有冲突提示文字
+    };
+  },
+  methods: {
+    showDialog() {
+      if (this.tableData.length) {
+        this.dialogVisible = true;
+      } else {
+        this.rulesConfirm()
+      }
+    },
+    handleClick() { },
+    handleClose(done) { },
+    //检查是否处理完所有冲突
+    userSelected() {
+      let flag = true;
+      this.tableData.map(t => {
+        if (!t.checked) {
+          flag = false;
+        }
+      })
+      this.finished = !flag;
+      flag && this.confirmClash()
+    },
+    //查询是否有冲突
+    getPromptobjs() {
+      dynamicPromptobjs('', res => {
+        this.tableData = res.Content.map((item) => {
+          item.OldMsg = {}
+          item.NewMsg = {}
+          return item
+        });
+      })
+    },
+    //展开行
+    expandRow(row) {
+      let index = this.tableData.indexOf(row);
+      if (row.OldMsg.TypeCode || row.NewMsg.TypeCode) return;
+      let param1 = {
+        Filters: `MeterFuncid='${row.Old}'`,
+        PageNumber: 1,
+        PageSize: 50
+      }
+      let param2 = {
+        Filters: `MeterFuncid='${row.New}'`,
+        PageNumber: 1,
+        PageSize: 50
+      }
+      dynamicQueryPoint(param1, res => {
+        row.OldMsg = res.Content[0]
+        this.tableData[index] = row
+      })
+      dynamicQueryPoint(param2, res => {
+        row.NewMsg = res.Content[0]
+        this.tableData[index] = row
+      })
+    },
+    //确认冲突
+    confirmClash(){
+      // let selectedRows = this.tableData.filter(item => {
+      //   return item.checked == 'Old'
+      // })
+      let selectedRows = this.tableData;
+      let param = [];
+      selectedRows.map(t => {
+        let tempObj = {
+          Objs:[t],
+          Points:[t]
+        }
+        param.push(tempObj)
+      })
+      dynamicClashConfirm(param, res => {
+        this.rulesConfirm();
+      })
+    },
+    //执行规则
+    rulesConfirm(){
+      dynamicExecute('', res => {
+        this.$message.success('执行成功');
+        this.dialogVisible = false;
+        this.tableData = []
+        this.$emit('refresh')
+      })
+    }
+  },
+  mounted() { },
+  created() {
+    this.getPromptobjs()
+  }
+};
+</script>
+<style lang="scss" scoped>
+#applyRules {
+  /deep/ td.bgf5 {
+    background-color: #f5f7fa;
+  }
+  td p {
+    text-align: center;
+  }
+}
+</style>

+ 54 - 0
src/components/point/dynamicdata/dataSource.vue

@@ -0,0 +1,54 @@
+<template>
+  <el-select v-model="Datasource" multiple collapse-tags placeholder="全部" filterable @change="changeType">
+    <el-option v-for="item in sourceList" :key="item" :label="item" :value="item"></el-option>
+  </el-select>
+</template>
+<script>
+import { dynamicDataSource } from "@/api/scan/request";
+import { mapGetters, mapActions } from "vuex";
+export default {
+  data() {
+    return {
+      sourceList: [], //数据字典设备类型
+      timer: null,
+      Datasource: []
+    };
+  },
+  props: {
+    Related: {},
+    typeName: {}
+  },
+  created() {
+    this.init();
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  methods: {
+    init() {
+      this.Datasource = [];
+      let param = { Related: this.Related, typeName: this.typeName };
+      //数据源
+      dynamicDataSource(param, res => {
+        if (res.Result == "success") {
+          this.sourceList = res.Content;
+        }
+      });
+    },
+    changeType(val) {
+      clearTimeout(this.timer);
+      this.timer = setTimeout(() => {
+        this.$emit("change", val);
+      }, 500);
+    }
+  },
+  watch: {
+    projectId(n, o) {
+      this.init();
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+</style>
+

+ 214 - 0
src/components/point/dynamicdata/delRelationDialog.vue

@@ -0,0 +1,214 @@
+<template>
+  <el-dialog title="提示" :visible.sync="dialogVisible" :width="dialogWidth" @close="handleClose" id="delRelation">
+    <span>确定要清除对应关系?</span>
+    <div v-loading="loading">
+      <div v-show="ltableData.length>1">
+        <div style="margin:10px 0;">有多个设备标识对应了该设备实例,是否一并清除对应关系?</div>
+        <el-row class="bgf5">
+          <el-col :span="18">
+            <el-table :data="ltableData" style="width: 100%;max-height:400px;" height="calc(100% - 160px)" @selection-change="changeSelection"
+              ref="ltable">
+              <el-table-column label="设备标识" align="right" class-name="bgfff">
+                <el-table-column label="数据源" prop="Datasource" align="right" class-name="bgfff" show-overflow-tooltip></el-table-column>
+                <el-table-column label="位置标签" prop="LocationFlag" align="right" class-name="bgfff" show-overflow-tooltip>
+                  <template slot-scope="scope">
+                    <div class="tool-tip">{{scope.row.LocationFlag.toString()}}</div>
+                  </template>
+                </el-table-column>
+                <el-table-column label="设备标识" prop="EquipmentMark" align="right" class-name="bgf5" show-overflow-tooltip></el-table-column>
+                <el-table-column type="selection" class-name="bgf5"></el-table-column>
+              </el-table-column>
+            </el-table>
+          </el-col>
+          <el-col :span="6">
+            <div class="singleDir pl-10 font-default">设备实例</div>
+            <div class="pl-10 font-default">{{rtableData[0]?rtableData[0].EquipLocalName:'--'}}</div>
+            <div class="pl-10 font-default">{{rtableData[0]?rtableData[0].BuildLocalName:'--'}}-{{rtableData[0]?rtableData[0].FloorLocalName:'--'}}</div>
+            <div class="pl-10 font-default">{{rtableData[0]?rtableData[0].RoomLocalName:'--'}}</div>
+          </el-col>
+        </el-row>
+      </div>
+      <div v-show="rtableData.length>1">
+        <div style="margin:10px 0;">有多个设备实例对应了该设备标识,是否一并清除对应关系?</div>
+        <el-row class="bgf5">
+          <el-col :span="6">
+            <div class="singleDir pr-10 font-default tr">设备标识</div>
+            <div class="pr-10 font-default tr">{{ltableData[0]?ltableData[0].EquipmentMark:'--'}}</div>
+            <div class="pr-10 font-default tr">{{ltableData[0]?ltableData[0].LocationFlag.toString():'--'}}</div>
+            <div class="pr-10 font-default tr">{{ltableData[0]?ltableData[0].Datasource:'--'}}</div>
+          </el-col>
+          <el-col :span="18">
+            <el-table :data="rtableData" style="width: 100%;max-height:400px;" height="calc(100% - 160px)" @selection-change="changeSelection"
+              ref="rtable">
+              <el-table-column label="设备实例" class-name="bgfff">
+                <el-table-column type="selection" class-name="bgf5"></el-table-column>
+                <el-table-column label="设备实例名称" prop="EquipLocalName" class-name="bgf5" show-overflow-tooltip></el-table-column>
+                <el-table-column label="设备实例编码" prop="ObjectID" class-name="bgfff" show-overflow-tooltip></el-table-column>
+                <el-table-column label="所在建筑楼层" class-name="bgfff">
+                  <template slot-scope="scope">
+                    <el-tooltip :content="scope.row.BuildLocalName&&scope.row.FloorLocalName?scope.row.BuildLocalName+'-'+scope.row.FloorLocalName:''" placement="top">
+                      <div class="tool-tip">{{scope.row.BuildLocalName&&scope.row.FloorLocalName?scope.row.BuildLocalName+'-'+scope.row.FloorLocalName:''}}</div>
+                    </el-tooltip>
+                  </template>
+                </el-table-column>
+                <el-table-column label="所在业务空间" prop="RoomLocalName" class-name="bgfff" show-overflow-tooltip></el-table-column>
+              </el-table-column>
+            </el-table>
+          </el-col>
+        </el-row>
+      </div>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="handleClose">取消</el-button>
+      <el-button size="small" type="primary" @click="handleDelete" :disabled="deleDisabled">清除已选</el-button>
+    </span>
+  </el-dialog>
+</template>
+<script>
+import { dynamicDeleteRelation, dynamicQueryPrompt } from "@/api/scan/request";
+export default {
+  data() {
+    return {
+      dialogVisible: false, //弹窗显示与隐藏
+      ltableData: [], // 左侧数据
+      rtableData: [], // 右侧数据
+      loading: false, //loading状态
+      dialogWidth: "20%", //弹窗宽度
+      selection: [],
+      deleDisabled: true,
+      deleParam: []
+    };
+  },
+  methods: {
+    //弹窗显示
+    showDialog(row) {
+      this.dialogVisible = true;
+      this.loading = true;
+      //需先用对象请求接口返回所需对象
+      this.getDynamicQueryPrompt(row)
+    },
+    handleClose(done) {
+      this.dialogVisible = false;
+      this.deleDisabled = true
+    },
+    //确认清除对应关系
+    handleDelete() {
+      dynamicDeleteRelation(this.deleParam, res => {
+        this.$emit("refresh");
+        this.dialogVisible = false;
+        this.$message.success('清除成功');
+      });
+    },
+    //表格中选择事件 1-n or n-1 公用
+    changeSelection(selection) {
+      this.deleParam = []
+      let tempObj = {}
+      this.deleDisabled = selection.length <= 0
+      if (this.ltableData.length > this.rtableData.length) {
+        tempObj.Objs = [selection[0]]
+        tempObj.Points = selection
+      } else if (this.ltableData.length < this.rtableData.length) {
+        tempObj.Objs = selection
+        tempObj.Points = [selection[0]]
+      } else {
+        tempObj.Objs = selection
+        tempObj.Points = selection
+      }
+      this.deleParam.push(tempObj)
+    },
+    //查询两边数据,同时拼删除param
+    getDynamicQueryPrompt(row) {
+      let p1 = {
+        Filters: `TypeCode='${row.TypeCode}';SubTypeCode='${row.SubTypeCode}';EquipmentMark='${row.EquipmentMark}'`,
+        PageNumber: 1,
+        PageSize: 500
+      }
+      //通过标识查询设备实例
+      let promise1 = new Promise((resolve, reject) => {
+        dynamicQueryPrompt(p1, res => {
+          resolve(res)
+        })
+      })
+      let p2 = {
+        Filters: `ObjectID='${row.ObjectID}'`,
+        PageNumber: 1,
+        PageSize: 500
+      }
+      let promise2 = new Promise((resolve, reject) => {
+        dynamicQueryPrompt(p2, res => {
+          resolve(res)
+        })
+      })
+      Promise.all([promise1, promise2]).then(res => {
+        this.deleParam = [];
+        this.ltableData = res[1].Content;
+        this.rtableData = res[0].Content;
+        if (this.ltableData.length > 1 || this.rtableData.length > 1) {
+          this.dialogWidth = "60%";
+        } else {
+          this.dialogWidth = "20%";
+        }
+        this.$nextTick(() => {
+          this.toggleSelection(row);
+        })
+        this.loading = false;
+      })
+    },
+    //设置默认选中
+    toggleSelection(row) {
+      if (this.ltableData.length > this.rtableData.length) {
+        this.ltableData.map((t, i) => {
+          if (t.ObjectID == row.ObjectID) {
+            this.$refs.ltable.toggleRowSelection(this.ltableData[i], true)
+            return;
+          }
+        })
+      } else {
+        this.rtableData.map((t, i) => {
+          if (t.ObjectID == row.ObjectID) {
+            this.$refs.rtable.toggleRowSelection(this.rtableData[i], true)
+            return;
+          }
+        })
+      }
+    }
+  },
+  mounted() { },
+  created() { }
+};
+</script>
+<style lang="scss" scoped>
+#delRelation {
+  /deep/ .bgf5 {
+    background-color: #f5f7fa;
+  }
+  /deep/ .bgfff {
+    background-color: #fff;
+  }
+  div.singleDir {
+    font-weight: 800;
+    color: #606266;
+    border-bottom: 1px solid #ebeef5;
+    background: #fff;
+    border-top: 1px solid #ebeef5;
+  }
+  .pl-10 {
+    padding-left: 10px;
+  }
+  .pr-10 {
+    padding-right: 10px;
+  }
+  .font-default {
+    line-height: 42px;
+    font-size: 12px;
+  }
+  .tr {
+    text-align: right;
+  }
+  .tool-tip{
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+  }
+}
+</style>

+ 59 - 0
src/components/point/dynamicdata/dictionaryDevice.vue

@@ -0,0 +1,59 @@
+<template>
+  <div>
+    <el-form>
+      <el-form-item label="数据字典设备类型">
+        <el-select v-model="SubTypeName" multiple collapse-tags placeholder="全部" filterable @change="changeType">
+          <el-option v-for="item in DynEquipList" :key="item" :label="item" :value="item"></el-option>
+        </el-select>
+      </el-form-item>
+    </el-form>
+  </div>
+</template>
+<script>
+import { dynamicDynEquipList } from "@/api/scan/request";
+import { mapGetters, mapActions } from "vuex";
+export default {
+  data() {
+    return {
+      DynEquipList: [], //数据字典设备类型
+      timer: null,
+      SubTypeName: []
+    };
+  },
+  props: {
+    Related: {},
+    typeName: {}
+  },
+  created() {
+    this.init();
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  methods: {
+    init() {
+      let param = { Related: this.Related, typeName: this.typeName };
+      //数据字典
+      dynamicDynEquipList(param, res => {
+        if (res.Result == "success") {
+          this.DynEquipList = res.Content;
+        }
+      });
+    },
+    changeType(val) {
+      clearTimeout(this.timer);
+      this.timer = setTimeout(() => {
+        this.$emit("change", val);
+      }, 500);
+    }
+  },
+  watch: {
+    projectId(n, o) {
+      this.init();
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+</style>
+

+ 263 - 0
src/components/point/dynamicdata/equipRules.vue

@@ -0,0 +1,263 @@
+
+<template>
+  <div id="equipRules">
+    <!-- 查询条件 -->
+    <div class="query-area">
+      <el-row>
+        <el-col :span="23">
+          <el-form ref="form" :model="form" :inline="true">
+            <el-row>
+              <div class="query-item">
+                <el-form-item class="special">
+                  <el-input placeholder="请输入设备标识关键字" v-model="form.EquipmentMark" @keyup.enter.native="queryTableData">
+                    <i slot="suffix" class="el-input__icon el-icon-search" @click="queryTableData"></i>
+                  </el-input>
+                </el-form-item>
+              </div>
+              <div class="query-item">
+                <label style="padding-right:9px">数据源</label>
+                <dataSource :Related="null" @change="changeDataSource" :typeName="typeName"></dataSource> 
+              </div>
+              <div class="query-item">
+                <dictionary-device @change="changeDictionary" :Related="null" :typeName="typeName"></dictionary-device>
+              </div>
+              <div class="query-item">
+                <label style="padding-right:9px">位置标签</label>
+                <locationFlag :Related="null" @change="changeLocationFlag" :typeName="typeName"></locationFlag>
+              </div>
+            </el-row>
+          </el-form>
+        </el-col>
+        <el-col :span="1">
+          <el-tooltip class="item" effect="dark" content="填充设备标识与实例对应规则" placement="left">
+            <el-button size="small" type="primary" @click="toAddRelation" icon="el-icon-edit-outline" style="float:right;"></el-button>
+          </el-tooltip>
+        </el-col>
+      </el-row>
+    </div>
+    <el-row>
+      <el-col :span="12" style="padding-left:10px;font-size:13px;border-left:2px solid #000;">点位表中出现的所有设备</el-col>
+      <el-col :span="12" style="padding-left:10px;font-size:13px;border-left:2px solid #000;">对应物理世界中的设备实例</el-col>
+    </el-row>
+    <!-- 列表区域 -->
+    <div class="table-area">
+      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="{background:'#f7f9fb'}">
+        <el-table-column prop="EquipmentMark" label="设备标识" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="LocationFlag" label="位置标签" min-width="200">
+          <template slot-scope="scope">
+            <el-tooltip :content="scope.row.LocationFlag.toString()" placement="top">
+              <div class="tool-tip">{{scope.row.LocationFlag.toString()}}</div>
+            </el-tooltip>
+          </template>
+        </el-table-column>
+        <el-table-column prop="Datasource" label="数据源" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="SubTypeName" label="数字字典设备类型" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="EquipLocalName" label="对应的设备实例" show-overflow-tooltip min-width="100" class-name="td-bl"></el-table-column>
+        <el-table-column label="实例所在建筑楼层" min-width="100">
+          <template slot-scope="scope">
+            <el-tooltip :content="scope.row.BuildLocalName&&scope.row.FloorLocalName?scope.row.BuildLocalName+'-'+scope.row.FloorLocalName:''" placement="top">
+              <div class="tool-tip">{{scope.row.BuildLocalName&&scope.row.FloorLocalName?scope.row.BuildLocalName+'-'+scope.row.FloorLocalName:''}}</div>
+            </el-tooltip>
+          </template>
+        </el-table-column>
+        <el-table-column prop="RoomLocalName" label="实例所在业务空间" show-overflow-tooltip min-width="200"></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 :disabled="scope.row.Related=='False'"
+                icon="el-icon-delete"></el-button>
+            </el-tooltip>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <!-- 分页 -->
+    <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>
+    <!-- 清除对应关系弹窗 -->
+    <del-relation-dialog ref="del" @refresh="refresh"></del-relation-dialog>
+  </div>
+</template>
+<script>
+import tools from "@/utils/tools";
+import { mapGetters, mapActions } from "vuex";
+import applyRulesDialog from "@/components/point/dynamicdata/applyRulesDialog";
+import delRelationDialog from "@/components/point/dynamicdata/delRelationDialog";
+import dictionaryDevice from "@/components/point/dynamicdata/dictionaryDevice";
+import dataSource from "@/components/point/dynamicdata/dataSource";
+import locationFlag from "@/components/point/dynamicdata/locationFlag";
+import equipRules from "@/components/point/dynamicdata/equipRules";
+import {
+  dynamicClashConfirm,
+  dynamicExecute,
+  dynamicQuery,
+  dynamicQueryPoint,
+  dynamicPointTypeList
+} from "@/api/scan/request";
+export default {
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  data() {
+    return {
+      sourceList: [], //数据源
+      DynEquipList: [], //数据字典设备类型
+      LocFlagList: [], //位置标签
+      tableData: [], //列表数据
+      page: {
+        pageSize: 50,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0
+      },
+      form: {
+        EquipmentMark: "", //设备标识关键字
+        SubTypeName: [], //数据字典设备类型
+        LocationFlag: [], //位置标签
+        Datasource: [] //数据源
+      }, //查询条件
+      loading: false, //列表loading
+    };
+  },
+  components: {
+    applyRulesDialog,
+    delRelationDialog,
+    dictionaryDevice,
+    dataSource,
+    locationFlag
+  },
+  props: {
+    typeName: {}
+  },
+  created() {
+    this.init();
+  },
+  mounted() { },
+  methods: {
+    //获取查询条件-提示信息
+    init() {
+      this.getTableData()
+    },
+    //清除对应关系
+    handleDelete(index, row) {
+      this.$refs.del.showDialog(row);
+    },
+    //改变pagesize
+    handleSizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+      this.getTableData();
+    },
+    //改变pageno
+    handleCurrentChange(pageNo) {
+      this.page.pageNumber = pageNo;
+      this.getTableData();
+    },
+    //跳转至填充对应规则
+    toAddRelation() {
+      this.$router.push({ path: "equipRela", query: { typeName: this.typeName } });
+    },
+    //获取表格数据
+    getTableData() {
+      let param = {
+        PageNumber: this.page.pageNumber,
+        PageSize: this.page.pageSize,
+        TypeNameList: [this.typeName]
+      };
+      //处理查询条件
+      if (this.form.EquipmentMark && this.form.EquipmentMark.length) {
+        param.EquipmentMark = this.form.EquipmentMark;
+      }
+      if (this.form.SubTypeName.length) {
+        param.SubTypeNameList = this.form.SubTypeName;
+      }
+      if (this.form.LocationFlag.length) {
+        param.LocationFlagList = this.form.LocationFlag;
+      }
+      if (this.form.Datasource.length) {
+        param.DatasourceList = this.form.Datasource;
+      }
+      this.loading = true;
+      // 查询对应关系(P1)
+      dynamicQuery(param, res => {
+        this.loading = false;
+        this.tableData = res.Content;
+        this.page.total = res.PageSize < 50 ? res.pageSize : res.Total;
+      });
+    },
+    //刷新列表
+    refresh() {
+      this.page.pageNumber = 1;
+      this.$emit('refresh',this.typeName);
+      this.getTableData();
+    },
+    //数据字典设备类型修改
+    changeDictionary(val) {
+      this.page.pageNumber = 1;
+      this.form.SubTypeName = val;
+      this.getTableData();
+    },
+    //数据源修改
+    changeDataSource(val) {
+      this.page.pageNumber = 1;
+      this.form.Datasource = val;
+      this.getTableData();
+    },
+    //修改位置标签
+    changeLocationFlag(val) {
+      this.page.pageNumber = 1;
+      this.form.LocationFlag = val;
+      this.getTableData();
+    },
+    //查询列表
+    queryTableData() {
+      this.page.pageNumber = 1;
+      this.getTableData();
+    }
+  },
+  watch: {
+    projectId() {
+      this.init();
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+#equipRules {
+  height: calc(100% - 54px);
+  /deep/ .text-right {
+    text-align: right;
+  }
+  .query-item {
+    float: left;
+    & + .query-item {
+      margin-left: 10px;
+    }
+    /deep/ .special .el-input__inner{
+      width: 220px;
+    }
+  }
+  /deep/ .table-area {
+    width: 100%;
+    height: calc(100% - 125px);
+    td div {
+      white-space: nowrap;
+      text-overflow: ellipsis;
+      overflow: hidden;
+    }
+    .td-bl {
+      border-left: 1px solid #ebeef5;
+    }
+    .tool-tip{
+      white-space: nowrap;
+      overflow: hidden;
+      text-overflow: ellipsis;
+    }
+  }
+  .fr {
+    padding-top: 10px;
+    float: right;
+  }
+}
+</style>
+

+ 147 - 0
src/components/point/dynamicdata/historyDialog.vue

@@ -0,0 +1,147 @@
+<template>
+  <el-dialog title="本次对应记录" :visible.sync="dialogVisible" width="70%" @close="handleClose" id="historyAction" custom-class="act-history">
+    <span>提示:可使用Contorl+F 搜索关键字</span>
+    <div>
+      <el-table :data="tableData" style="width: 100%;" :show-header="showheader" height="400px">
+        <el-table-column>
+          <el-table-column label="数据源" align="right">
+            <template slot-scope="scope">
+              <div v-for="t in scope.row.leftList" :key="t.id">
+                <el-tooltip :content="t.Datasource" placement="top">
+                  <div>{{t.Datasource}}</div>
+                </el-tooltip>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column label="位置标签" align="right">
+            <template slot-scope="scope">
+              <div v-for="t in scope.row.leftList" :key="t.id">
+                <el-tooltip :content="t.LocationFlag.toString()" placement="top">
+                  <div>{{t.LocationFlag.toString()}}</div>
+                </el-tooltip>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column label="设备标识" width="200px" class-name="bgf5" align="right">
+            <template slot-scope="scope">
+              <div v-for="t in scope.row.leftList" :key="t.id">
+                <el-tooltip :content="t.EquipmentMark" placement="top">
+                  <div>{{t.EquipmentMark}}</div>
+                </el-tooltip>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table-column>
+        <el-table-column>
+          <el-table-column label="设备实例名称" width="200px" class-name="bgf5 border-l">
+            <template slot-scope="scope">
+              <div v-for="t in scope.row.rightList" :key="t.id">
+                <el-tooltip :content="t.EquipLocalName" placement="top">
+                  <div>{{t.EquipLocalName}}</div>
+                </el-tooltip>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column label="设备实例编码">
+            <template slot-scope="scope">
+              <div v-for="t in scope.row.rightList" :key="t.id">
+                <el-tooltip :content="t.ObjectID" placement="top">
+                  <div>{{t.ObjectID}}</div>
+                </el-tooltip>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column label="所在建筑楼层">
+            <template slot-scope="scope">
+              <div v-for="t in scope.row.rightList" :key="t.id">
+                <el-tooltip
+                  :content="t.BuildLocalName&&t.FloorLocalName&&t.BuildLocalName!='null'&&t.FloorLocalName!='null'?t.BuildLocalName+'-'+t.FloorLocalName:''"
+                  placement="top">
+                  <div>
+                    {{t.BuildLocalName&&t.FloorLocalName&&t.BuildLocalName!='null'&&t.FloorLocalName!='null'?t.BuildLocalName+'-'+t.FloorLocalName:''}}
+                  </div>
+                </el-tooltip>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column label="所在业务空间">
+            <template slot-scope="scope">
+              <div v-for="t in scope.row.rightList" :key="t.id">
+                <el-tooltip :content="t.RoomLocalName&&t.RoomLocalName!='null'?t.RoomLocalName:''" placement="top">
+                  <div>{{t.RoomLocalName&&t.RoomLocalName!='null'?t.RoomLocalName:''}}</div>
+                </el-tooltip>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table-column>
+        <el-table-column label="操作" width="100px">
+          <template slot-scope="scope">
+            <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain>清除对应</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+  </el-dialog>
+</template>
+<script>
+import { dynamicDeleteRelation } from "@/api/scan/request";
+export default {
+  data() {
+    return {
+      dialogVisible: false, //弹窗显示与隐藏
+      showheader: false,
+      tableData: [] //数据list
+    };
+  },
+  methods: {
+    showDialog(data) {
+      this.tableData = data;
+      this.dialogVisible = true;
+    },
+    handleClose(done) { },
+    //清除关系
+    handleDelete(i, t) {
+      let param = [];
+      let object = {
+        Objs: t.rightList,
+        Points: t.leftList
+      };
+      param.push(object);
+      dynamicDeleteRelation(param, res => {
+        if (res.Result == "success") {
+          this.$message.success("清除关联成功");
+          this.tableData.splice(i, 1);
+          this.$emit("delSuc");
+        }
+      });
+    }
+  },
+  mounted() { },
+  created() { }
+};
+</script>
+<style lang="scss" scoped>
+#historyAction {
+  /deep/ .act-history.el-dialog {
+    max-height: 60%;
+    overflow-y: auto;
+    overflow-x: hidden;
+    td.bgf5 {
+      background-color: #f5f7fa;
+    }
+    td {
+      border-bottom: 1px solid #ccc;
+      border-top: 1px solid #ccc;
+      div {
+        line-height: 34px;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+        overflow: hidden;
+      }
+    }
+    .border-l {
+      border-left: 2px solid #ccc;
+    }
+  }
+}
+</style>

+ 88 - 0
src/components/point/dynamicdata/locationCascader.vue

@@ -0,0 +1,88 @@
+<template>
+  <el-cascader placeholder="请选择所在位置" :options="LocationList" v-model="value" filterable size="small" @change="changeCascader" change-on-select
+    :props="props" clearable class="location"></el-cascader>
+</template>
+<script>
+import { dynamicLocationList } from "@/api/scan/request";
+import { mapGetters, mapActions } from "vuex";
+export default {
+  data() {
+    return {
+      LocationList: [],
+      value: [],
+      timer: null,
+      props: {
+        value: 'Name',
+        label: 'Name',
+        children: 'List'
+      }
+    };
+  },
+  created() {
+    this.init();
+  },
+  props: {
+    Related: {},
+    typeName: {}
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  methods: {
+    init() {
+      let param = { Related: this.Related, typeName: this.typeName };
+      dynamicLocationList(param, res => {
+        this.LocationList = res.Content[0].List;
+        //添加未明确对象
+        this.LocationList = this.delNullItems(this.LocationList)
+        this.LocationList.map(item => {
+          if (item.List) {
+            item.List.map(child => {
+              if (child.List) {
+                child.List.unshift({ Name: '未明确业务空间' })
+              }
+            })
+            item.List.unshift({ Name: '未明确楼层' })
+          }
+        })
+        this.LocationList.unshift({ Name: '未明确建筑' })
+      });
+    },
+    delNullItems(arr) {
+      let tempArr = JSON.parse(JSON.stringify(arr))
+      let options = tempArr.map(item => {
+        if (item.Name == 'null') return undefined
+        if (item.List && item.List.length) {
+          item.List = this.delNullItems(item.List)
+        }
+        return item
+      }).filter(d => d)
+      return options
+    },
+    changeCascader(val) {
+      clearTimeout(this.timer);
+      this.timer = setTimeout(() => {
+        let tempVal = JSON.parse(JSON.stringify(val));
+        if (tempVal.length && tempVal[tempVal.length - 1].indexOf('未明确') > -1) {
+          tempVal.splice(tempVal.length - 1, 1, '')
+        }
+        this.$emit("change", tempVal);
+      }, 800);
+    }
+  },
+  watch: {
+    projectId(n, o) {
+      this.init();
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+.location {
+  width: 100%;
+  /deep/ .el-input__inner {
+    vertical-align: baseline;
+  }
+}
+</style>
+

+ 54 - 0
src/components/point/dynamicdata/locationFlag.vue

@@ -0,0 +1,54 @@
+<template>
+  <el-select v-model="LocationFlag" multiple collapse-tags placeholder="全部" filterable @change="changeType">
+    <el-option v-for="item in LocFlagList" :key="item" :label="item" :value="item"></el-option>
+  </el-select>
+</template>
+<script>
+import { dynamicLocFlagList } from "@/api/scan/request";
+import { mapGetters, mapActions } from "vuex";
+export default {
+  data() {
+    return {
+      LocFlagList: [],
+      timer: null,
+      LocationFlag: []
+    };
+  },
+  props: {
+    Related: {},
+    typeName: {}
+  },
+  created() {
+    this.init();
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  methods: {
+    init() {
+      this.Datasource = [];
+      let param = { Related: this.Related, typeName: this.typeName };
+      // 位置标签
+      dynamicLocFlagList(param, res => {
+        if (res.Result == "success") {
+          this.LocFlagList = res.Content;
+        }
+      });
+    },
+    changeType(val) {
+      clearTimeout(this.timer);
+      this.timer = setTimeout(() => {
+        this.$emit("change", val);
+      }, 500);
+    }
+  },
+  watch: {
+    projectId(n, o) {
+      this.init();
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+</style>
+

+ 252 - 0
src/components/point/dynamicdata/partsRules.vue

@@ -0,0 +1,252 @@
+
+<template>
+<!-- 部件 -->
+  <div id="equipRules">
+    <!-- 查询条件 -->
+    <div class="query-area">
+      <el-row>
+        <el-col :span="23">
+          <el-form ref="form" :model="form" :inline="true">
+            <el-row>
+              <div class="query-item">
+                <el-form-item>
+                  <el-input placeholder="请输入部件标识关键字" v-model="form.EquipmentMark" class="input-with-select">
+                    <el-button slot="append" icon="el-icon-search" @click="queryTableData"></el-button>
+                  </el-input>
+                </el-form-item>
+              </div>
+              <div class="query-item">
+                <label>数据源</label>
+                <dataSource :Related="true" @change="changeDataSource"></dataSource>
+              </div>
+              <div class="query-item">
+                <dictionary-device @change="changeDictionary" :Related="true"></dictionary-device>
+              </div>
+              <div class="query-item">
+                <label>位置标签</label>
+                <locationFlag :Related="true" @change="changeLocationFlag"></locationFlag>
+              </div>
+            </el-row>
+          </el-form>
+        </el-col>
+        <el-col :span="1">
+          <el-tooltip class="item" effect="dark" content="填充部件标识与实例对应规则" placement="left">
+            <el-button size="small" type="primary" @click="toAddRelation" icon="el-icon-edit-outline" style="float:right;"></el-button>
+          </el-tooltip>
+        </el-col>
+      </el-row>
+    </div>
+    <el-row>
+      <el-col :span="12" style="padding-left:10px;font-size:13px;border-left:2px solid #000;">点位表中出现的所有部件</el-col>
+      <el-col :span="12" style="padding-left:10px;font-size:13px;border-left:2px solid #000;">对应物理世界中的部件实例</el-col>
+    </el-row>
+    <!-- 列表区域 -->
+    <div class="table-area">
+      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="{background:'#f7f9fb'}">
+        <el-table-column prop="EquipmentMark" label="部件标识" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="LocationFlag" label="位置标签" min-width="200">
+          <template slot-scope="scope">
+            <el-tooltip :content="scope.row.LocationFlag.toString()" placement="top">
+              <span>{{scope.row.LocationFlag.toString()}}</span>
+            </el-tooltip>
+          </template>
+        </el-table-column>
+        <el-table-column prop="Datasource" label="数据源" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="SubTypeName" label="数字字典部件类型" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="EquipLocalName" label="对应的部件实例" show-overflow-tooltip min-width="100" class-name="td-bl"></el-table-column>
+        <el-table-column prop="FloorLocalName" label="实例所在建筑楼层" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="RoomLocalName" label="实例所在业务空间" show-overflow-tooltip min-width="200"></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 :disabled="scope.row.Related=='False'"
+                icon="el-icon-delete"></el-button>
+            </el-tooltip>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <!-- 分页 -->
+    <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>
+    <!-- 清除对应关系弹窗 -->
+    <del-relation-dialog ref="del" @refresh="refresh"></del-relation-dialog>
+  </div>
+</template>
+<script>
+import tools from "@/utils/tools";
+import { mapGetters, mapActions } from "vuex";
+import applyRulesDialog from "@/components/point/dynamicdata/applyRulesDialog";
+import delRelationDialog from "@/components/point/dynamicdata/delRelationDialog";
+import dictionaryDevice from "@/components/point/dynamicdata/dictionaryDevice";
+import dataSource from "@/components/point/dynamicdata/dataSource";
+import locationFlag from "@/components/point/dynamicdata/locationFlag";
+import equipRules from "@/components/point/dynamicdata/equipRules";
+import {
+  dynamicClashConfirm,
+  dynamicExecute,
+  dynamicQuery,
+  dynamicQueryPoint,
+  dynamicPointTypeList
+} from "@/api/scan/request";
+export default {
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  data() {
+    return {
+      sourceList: [], //数据源
+      DynEquipList: [], //数据字典部件类型
+      LocFlagList: [], //位置标签
+      tableData: [], //列表数据
+      page: {
+        pageSize: 50,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0
+      },
+      form: {
+        EquipmentMark: "", //部件标识关键字
+        SubTypeName: [], //数据字典部件类型
+        LocationFlag: [], //位置标签
+        Datasource: [] //数据源
+      }, //查询条件
+      loading: false, //列表loading
+    };
+  },
+  components: {
+    applyRulesDialog,
+    delRelationDialog,
+    dictionaryDevice,
+    dataSource,
+    locationFlag
+  },
+  props: {
+    typeName: {}
+  },
+  created() {
+    this.init();
+  },
+  mounted() { },
+  methods: {
+    //获取查询条件-提示信息
+    init() {
+      alert(1)
+      this.getTableData()
+    },
+    //清除对应关系
+    handleDelete(index, row) {
+      this.$refs.del.showDialog(row);
+    },
+    //改变pagesize
+    handleSizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+      this.getTableData();
+    },
+    //改变pageno
+    handleCurrentChange(pageNo) {
+      this.page.pageNumber = pageNo;
+      this.getTableData();
+    },
+    //跳转至填充对应规则
+    toAddRelation() {
+      this.$router.push({ path: "equipRela", query: { typeName: this.typeName } });
+    },
+    //获取表格数据
+    getTableData() {
+      let param = {
+        PageNumber: this.page.pageNumber,
+        PageSize: this.page.pageSize,
+        TypeNameList: [this.typeName]
+      };
+      //处理查询条件
+      if (this.form.EquipmentMark && this.form.EquipmentMark.length) {
+        param.EquipmentMark = this.form.EquipmentMark;
+      }
+      if (this.form.SubTypeName.length) {
+        param.SubTypeNameList = this.form.SubTypeName;
+      }
+      if (this.form.LocationFlag.length) {
+        param.LocationFlagList = this.form.LocationFlag;
+      }
+      if (this.form.Datasource.length) {
+        param.DatasourceList = this.form.Datasource;
+      }
+      this.loading = true;
+      // 查询对应关系(P1)
+      dynamicQuery(param, res => {
+        this.loading = false;
+        if (res.Result == "success") {
+          this.tableData = res.Content;
+          this.page.total = res.Total;
+        }
+      });
+    },
+    //刷新列表
+    refresh() {
+      this.page.pageNumber = 1;
+      this.getTypeNames();
+    },
+    //数据字典部件类型修改
+    changeDictionary(val) {
+      this.page.pageNumber = 1;
+      this.form.SubTypeName = val;
+      this.getTableData();
+    },
+    //数据源修改
+    changeDataSource(val) {
+      this.page.pageNumber = 1;
+      this.form.Datasource = val;
+      this.getTableData();
+    },
+    //修改位置标签
+    changeLocationFlag(val) {
+      this.page.pageNumber = 1;
+      this.form.LocationFlag = val;
+      this.getTableData();
+    },
+    //查询列表
+    queryTableData() {
+      this.page.pageNumber = 1;
+      this.getTableData();
+    }
+  },
+  watch: {
+    projectId() {
+      this.init();
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+#equipRules {
+  height: calc(100% - 54px);
+  /deep/ .text-right {
+    text-align: right;
+  }
+  .query-item {
+    float: left;
+    & + .query-item {
+      margin-left: 10px;
+    }
+  }
+  /deep/ .table-area {
+    width: 100%;
+    height: calc(100% - 125px);
+    td div {
+      white-space: nowrap;
+      text-overflow: ellipsis;
+      overflow: hidden;
+    }
+    .td-bl {
+      border-left: 1px solid #ebeef5;
+    }
+  }
+  .fr {
+    padding-top: 10px;
+    float: right;
+  }
+}
+</style>
+

+ 306 - 393
src/data/menus.js

@@ -1,394 +1,307 @@
-export default [    
-    //数字化交付相关
-    {
-        path: '/projgroup',
-        name: '数字化交付相关',
-        disabled: true,
-    },
-    // 项目化配置
-    {
-        path: '/proj',
-        name: '项目基础设置',
-        icon: 'el-icon-fa-bank',
-        children: [           
-            {
-                path: '/proj/collectsetting',
-                name: '项目需采集的信息点',
-                icon: 'el-icon-fa-user',
-                opts: [
-                    {
-                        name: '查看',
-                        basic: true,
-                        permission: 'system:role:query'
-                    }
-                ]
-            }, 
-            // {
-            //     path: '/proj/custominfo',
-            //     name: '自定义信息点',
-            //     icon: 'el-icon-fa-user',
-            //     opts: [
-            //         {
-            //             name: '查看',
-            //             basic: true,
-            //             permission: 'system:role:query'
-            //         }
-            //     ]
-            // }, 
-            {
-                path: '/proj/floorinfo',
-                name: '楼层信息管理',
-                icon: 'el-icon-fa-user',
-                opts: [
-                    {
-                        name: '查看',
-                        basic: true,
-                        permission: 'system:role:query'
-                    }
-                ]
-            },
-            {
-                path: '/floor/appuser',
-                name: '扫楼App用户管理',
-                icon: 'el-icon-fa-user',
-                opts: [
-                    {
-                        name: '查看',
-                        basic: true,
-                        permission: 'system:role:query'
-                    }
-                ]
-            }
-        ]
-    },
-    // 模型管理
-    {
-        path: '/model',
-        name: '模型管理',
-        icon: 'el-icon-fa-bank',
-        children: [
-            {
-                path: '/model/file',
-                name: '模型文件管理',
-                icon: 'el-icon-fa-user',
-                opts: [
-                    {
-                        name: '查看',
-                        basic: true,
-                        permission: 'system:role:query'
-                    }
-                ]
-            }, {
-                path: '/model/noentity',
-                name: '未实体化模型清单',
-                icon: 'el-icon-fa-user',
-                opts: [
-                    {
-                        name: '查看',
-                        basic: true,
-                        permission: 'system:role:query'
-                    }
-                ]
-            }, {
-                path: '/model/beforemodel',
-                name: '待建模清单',
-                icon: 'el-icon-fa-user',
-                opts: [
-                    {
-                        name: '查看',
-                        basic: true,
-                        permission: 'system:role:query'
-                    }
-                ]
-            }, {
-                path: '/model/modelrule',
-                name: '拓扑检查',
-                icon: 'el-icon-fa-user',
-                opts: [
-                    {
-                        name: '查看',
-                        basic: true,
-                        permission: 'system:role:query'
-                    }
-                ]
-            }, {
-                path: '/model/beacon',
-                name: '信标清单',
-                icon: 'el-icon-fa-user',
-                opts: [
-                    {
-                        name: '查看',
-                        basic: true,
-                        permission: 'system:role:query'
-                    }
-                ]
-            }
-        ]
-    },
-        // 系统集成
-        {
-            path: '/point',
-            name: '系统集成',
-            icon: 'el-icon-fa-bank',
-            children: [
-                {
-                    path: '/point/pointsetting',
-                    name: '点位表配置工具',
-                    icon: 'el-icon-fa-user',
-                    opts: [
-                        {
-                            name: '查看',
-                            basic: true,
-                            permission: 'system:role:query'
-                        }
-                    ]
-                }, {
-                    path: '/point/dynamicdata',
-                    name: '动态数据关联',
-                    icon: 'el-icon-fa-user',
-                    opts: [
-                        {
-                            name: '查看',
-                            basic: true,
-                            permission: 'system:role:query'
-                        }
-                    ]
-                }
-            ]
-        },
-    //扫楼作业
-    {
-        path: '/floor',
-        name: '扫楼作业',
-        icon: 'el-icon-fa-bank',
-        children: [
-            {
-                path: '/floor/data',
-                name: '扫楼数据管理',
-                icon: 'el-icon-fa-user',
-                opts: [
-                    {
-                        name: '查看',
-                        basic: true,
-                        permission: 'system:role:query'
-                    }
-                ]
-            },
-            {
-                path: '/floor/plan',
-                name: '楼层平面图管理',
-                icon: 'el-icon-fa-user',
-                opts: [
-                    {
-                        name: '查看',
-                        basic: true,
-                        permission: 'system:role:query'
-                    }
-                ]
-            },
-            {
-                path: '/floor/abnormalprop',
-                name: '异常资产清单',
-                icon: 'el-icon-fa-user',
-                opts: [
-                    {
-                        name: '查看',
-                        basic: true,
-                        permission: 'system:role:query'
-                    }
-                ]
-            },
-            {
-                path: '/floor/log',
-                name: '扫楼日志查看',
-                icon: 'el-icon-fa-user',
-                opts: [
-                    {
-                        name: '查看',
-                        basic: true,
-                        permission: 'system:role:query'
-                    }
-                ]
-            }
-        ]
-    },
-        //台账管理
-        {
-            path: '/ledger',
-            name: '台账管理',
-            icon: 'el-icon-fa-bank',
-            children: [
-                {
-                    path: '/ledger/facility',
-                    name: '设备清单',
-                    icon: 'el-icon-fa-user',
-                    opts: [
-                        {
-                            name: '查看',
-                            basic: true,
-                            permission: 'system:role:query'
-                        }
-                    ]
-                },
-                {
-                    path: '/ledger/property',
-                    name: '资产清单',
-                    icon: 'el-icon-fa-user',
-                    opts: [
-                        {
-                            name: '查看',
-                            basic: true,
-                            permission: 'system:role:query'
-                        }
-                    ]
-                },
-                {
-                    path: '/ledger/cenotelist',
-                    name: '竖井清单',
-                    icon: 'el-icon-fa-user',
-                    opts: [
-                        {
-                            name: '查看',
-                            basic: true,
-                            permission: 'system:role:query'
-                        }
-                    ]
-                },
-                {
-                    path: '/ledger/dimension',
-                    name: '元空间管理',
-                    icon: 'el-icon-fa-user',
-                    opts: [
-                        {
-                            name: '查看',
-                            basic: true,
-                            permission: 'system:role:query'
-                        }
-                    ]
-                }, 
-                {
-                    path: '/ledger/rubbish',
-                    name: '垃圾数据检查',
-                    icon: 'el-icon-fa-user',
-                    opts: [
-                        {
-                            name: '查看',
-                            basic: true,
-                            permission: 'system:role:query'
-                        }
-                    ]
-                }, 
-                {
-                    path: '/ledger/updowncheck',
-                    name: '上下级关系检查',
-                    icon: 'el-icon-fa-user',
-                    opts: [
-                        {
-                            name: '查看',
-                            basic: true,
-                            permission: 'system:role:query'
-                        }
-                    ]
-                }                
-                
-            ]
-        },
-    //业务相关
-    {
-        path: '/busgroup',
-        name: '业务相关',
-        disabled: true,
-    },
-        //业务空间管理
-        {
-            path: '/business',
-            name: '业务空间管理',
-            icon: 'el-icon-fa-bank',
-            children: [
-                {
-                    path: '/business/spacelist',
-                    name: '业务空间清单',
-                    icon: 'el-icon-fa-user',
-                    opts: [
-                        {
-                            name: '查看',
-                            basic: true,
-                            permission: 'system:role:query'
-                        }
-                    ]
-                },
-            ]
-        },
-        //租户管理
-        {
-            path: '/rent',
-            name: '租户管理',
-            icon: 'el-icon-fa-bank',
-            children: [
-                {
-                    path: '/rent/rentlist',
-                    name: '租户清单',
-                    icon: 'el-icon-fa-user',
-                    opts: [
-                        {
-                            name: '查看',
-                            basic: true,
-                            permission: 'system:role:query'
-                        }
-                    ]
-                },
-                // {
-                //     path: '/ren',
-                //     name: '二级页面',
-                //     icon: 'el-icon-fa-user',
-                //     children: [
-                //         {
-                //             path: '/fewfewgf',
-                //             name: '三级页面1-1',
-                //             icon: '',
-                //             opts: [
-                //                 {
-                //                     name: '查看',
-                //                     basic: true,
-                //                     permission: 'system:role:query'
-                //                 }
-                //             ]
-                //         },
-                //         {
-                //             path: '/ledger/cenoteadd',
-                //             name: '三级页面1-2',
-                //             icon: '',
-                //             opts: [
-                //                 {
-                //                     name: '查看',
-                //                     basic: true,
-                //                     permission: 'system:role:query'
-                //                 }
-                //             ]
-                //         }
-                //     ]
-                // }
-            ]
-        },
-        //系统管理
-        {
-            path: '/system',
-            name: '系统管理',
-            icon: 'el-icon-fa-bank',
-            children: [
-                {
-                    path: '/system/list',
-                    name: '系统清单',
-                    icon: 'el-icon-fa-user',
-                    opts: [
-                        {
-                            name: '查看',
-                            basic: true,
-                            permission: 'system:role:query'
-                        }
-                    ]
-                },
-            ]
-        },
-   
+export default [
+	/******************** 平台管理 ***************************/
+	{
+		path: '/platform',
+		name: '平台管理',
+		disabled: true,
+	},
+	// 项目管理
+	{
+		path: '/platform/project',
+		name: '项目管理',
+		icon: 'icon-project-o'
+	},
+	// 人员管理
+	{
+		path: '/platform/user',
+		name: '人员管理',
+		icon: 'icon-renyuanguanli',
+		opts: [{
+			name: '查看',
+			basic: true,
+			permission: 'system:user:query'
+		}]
+	},
+	// 角色管理
+	{
+		path: '/platform/role',
+		name: '角色管理',
+		icon: 'icon-jiaoseguanli',
+		opts: [{
+			name: '查看',
+			basic: true,
+			permission: 'system:role:query'
+		}]
+	},
+	/******************** 前期准备 ***************************/
+	{
+		path: '/ready',
+		name: '前期准备',
+		disabled: true,
+	},
+	// 建筑楼层管理
+	{
+		path: '/ready/buildfloor',
+		name: '建筑楼层管理',
+		icon: 'icon-jianzhu'
+	},
+	// 需采集的信息点
+	{
+		path: '/ready/collectsetting',
+		name: '需采集的信息点',
+		icon: 'icon-xinxi'
+	},
+	// 扫楼App用户管理
+	{
+		path: '/ready/appuser',
+		name: '扫楼App用户管理',
+		icon: 'icon-app4'
+	},
+	/******************** 信息收集 ***************************/
+	{
+		path: '/information',
+		name: '信息收集',
+		disabled: true,
+	},
+	// 模型管理
+	{
+		path: '/model',
+		name: '模型管理',
+		icon: 'icon-moxing___',
+		children: [{
+			path: '/model/file',
+			name: '模型文件管理',
+			icon: '',
+			opts: [{
+				name: '查看',
+				basic: true,
+				permission: 'system:role:query'
+			}]
+		}, {
+			path: '/model/report',
+			name: '模型质量报告',
+			icon: '',
+			opts: [{
+				name: '查看',
+				basic: true,
+				permission: 'system:role:query'
+			}]
+		}]
+	},
+	// 系统集成
+	{
+		path: '/point',
+		name: '系统集成',
+		icon: 'icon-xitong',
+		children: [{
+			path: '/point/pointsetting',
+			name: '子系统点位接入',
+			icon: '',
+			opts: [{
+				name: '查看',
+				basic: true,
+				permission: 'system:role:query'
+			}]
+		}, {
+			path: '/point/dynamicdata',
+			name: '配置动参从点位取值',
+			icon: '',
+			opts: [{
+				name: '查看',
+				basic: true,
+				permission: 'system:role:query'
+			}]
+		}, {
+			path: '/point/objectdata',
+			name: '配置动参从对象取值',
+			icon: '',
+			opts: [{
+				name: '查看',
+				basic: true,
+				permission: 'system:role:query'
+			}]
+		}, {
+			path: '/point/report',
+			name: '系统集成成果管理',
+			icon: '',
+			opts: [{
+				name: '查看',
+				basic: true,
+				permission: 'system:role:query'
+			}]
+		}]
+	},
+	// 扫楼作业
+	{
+		path: '/floor',
+		name: '扫楼作业',
+		icon: 'icon-shanglou',
+		children: [{
+			path: '/floor/task',
+			name: '现场任务管理',
+			icon: '',
+			opts: [{
+				name: '查看',
+				basic: true,
+				permission: 'system:role:query'
+			}]
+		},{
+			path: '/floor/data',
+			name: '现场数据整理',
+			icon: '',
+			children: [ {
+				path: '/floor/data',
+				name: '信息点整理',
+				icon: '',
+				opts: [{
+					name: '查看',
+					basic: true,
+					permission: 'system:role:query'
+				}]
+			},
+			{
+				path: '/floor/plan',
+				name: '位置标签整理',
+				icon: '',
+				opts: [{
+					name: '查看',
+					basic: true,
+					permission: 'system:role:query'
+				}]
+			}]
+		}, {
+			path: '/floor/abnormalprop',
+			name: '扫楼报告',
+			icon: '',
+			opts: [{
+				name: '查看',
+				basic: true,
+				permission: 'system:role:query'
+			}]
+		}, {
+			path: '/floor/log',
+			name: '扫楼日志查看',
+			icon: '',
+			opts: [{
+				name: '查看',
+				basic: true,
+				permission: 'system:role:query'
+			}]
+		}]
+	},
+	// 台账管理
+	{
+		path: '/ledger',
+		name: '台账管理',
+		icon: 'icon-taizhangzhangbushezhi',
+		children: [{
+			path: '/ledger/facility',
+			name: '设备台账',
+			icon: '',
+			opts: [{
+				name: '查看',
+				basic: true,
+				permission: 'system:role:query'
+			}]
+		}, {
+			path: '/ledger/property',
+			name: '资产台账',
+			icon: '',
+			opts: [{
+				name: '查看',
+				basic: true,
+				permission: 'system:role:query'
+			}]
+		}, {
+			path: '/ledger/list',
+			name: '系统台账',
+			icon: '',
+			opts: [{
+				name: '查看',
+				basic: true,
+				permission: 'system:role:query'
+			}]
+		}, {
+			path: '/ledger/spacelist',
+			name: '业务空间台账',
+			icon: '',
+			opts: [{
+				name: '查看',
+				basic: true,
+				permission: 'system:role:query'
+			}]
+		}, {
+				path: '/ledger/cenotelist',
+				name: '竖井台账',
+				icon: '',
+				opts: [{
+					name: '查看',
+					basic: true,
+					permission: 'system:role:query'
+				}]
+		},{
+			path: '/ledger/rentlist',
+			name: '租户台账',
+			icon: '',
+			opts: [{
+				name: '查看',
+				basic: true,
+				permission: 'system:role:query'
+			}]
+		}, {
+			path: '/ledger/datareport',
+			name: '数据质量报告',
+			icon: '',
+			opts: [{
+				name: '查看',
+				basic: true,
+				permission: 'system:role:query'
+			}]
+		}]
+	},
+	/******************** 关系维护并计算 ***************************/
+	{
+		path: '/relation',
+		name: '关系维护并计算',
+		disabled: true,
+	},
+	// 关系维护
+	{
+		path: '/relation/maintain',
+		name: '关系维护',
+		icon: 'icon-guanxi',
+		opts: [{
+			name: '查看',
+			basic: true,
+			permission: 'system:user:query'
+		}]
+	},
+	// 全部关系总览
+	{
+		path: '/relation/overview',
+		name: '全部关系总览',
+		icon: 'icon-jiqixuexi-',
+		opts: [{
+			name: '查看',
+			basic: true,
+			permission: 'system:role:query'
+		}]
+	},
+	/******************** 通用字典 ***************************/
+	// {
+	// 	path: '/dictionaries',
+	// 	name: '通用字典',
+	// 	disabled: true,
+	// },
+	// // 厂家库
+	// {
+	// 	path: '/manufactor/supplier',
+	// 	name: '厂家库',
+	// 	icon: '',
+	// 	opts: [{
+	// 		name: '查看',
+	// 		basic: true,
+	// 		permission: 'system:role:query'
+	// 	}]
+	// }
 ]

+ 394 - 0
src/data/old.js

@@ -0,0 +1,394 @@
+export default [    
+    //数字化交付相关
+    {
+        path: '/projgroup',
+        name: '数字化交付相关',
+        disabled: true,
+    },
+    // 项目化配置
+    {
+        path: '/proj',
+        name: '项目基础设置',
+        icon: 'el-icon-fa-bank',
+        children: [           
+            {
+                path: '/proj/collectsetting',
+                name: '项目需采集的信息点',
+                icon: 'el-icon-fa-user',
+                opts: [
+                    {
+                        name: '查看',
+                        basic: true,
+                        permission: 'system:role:query'
+                    }
+                ]
+            }, 
+            // {
+            //     path: '/proj/custominfo',
+            //     name: '自定义信息点',
+            //     icon: 'el-icon-fa-user',
+            //     opts: [
+            //         {
+            //             name: '查看',
+            //             basic: true,
+            //             permission: 'system:role:query'
+            //         }
+            //     ]
+            // }, 
+            {
+                path: '/proj/floorinfo',
+                name: '楼层信息管理',
+                icon: 'el-icon-fa-user',
+                opts: [
+                    {
+                        name: '查看',
+                        basic: true,
+                        permission: 'system:role:query'
+                    }
+                ]
+            },
+            {
+                path: '/floor/appuser',
+                name: '扫楼App用户管理',
+                icon: 'el-icon-fa-user',
+                opts: [
+                    {
+                        name: '查看',
+                        basic: true,
+                        permission: 'system:role:query'
+                    }
+                ]
+            }
+        ]
+    },
+    // 模型管理
+    {
+        path: '/model',
+        name: '模型管理',
+        icon: 'el-icon-fa-bank',
+        children: [
+            {
+                path: '/model/file',
+                name: '模型文件管理',
+                icon: 'el-icon-fa-user',
+                opts: [
+                    {
+                        name: '查看',
+                        basic: true,
+                        permission: 'system:role:query'
+                    }
+                ]
+            }, {
+                path: '/model/noentity',
+                name: '未实体化模型清单',
+                icon: 'el-icon-fa-user',
+                opts: [
+                    {
+                        name: '查看',
+                        basic: true,
+                        permission: 'system:role:query'
+                    }
+                ]
+            }, {
+                path: '/model/beforemodel',
+                name: '待建模清单',
+                icon: 'el-icon-fa-user',
+                opts: [
+                    {
+                        name: '查看',
+                        basic: true,
+                        permission: 'system:role:query'
+                    }
+                ]
+            }, {
+                path: '/model/modelrule',
+                name: '拓扑检查',
+                icon: 'el-icon-fa-user',
+                opts: [
+                    {
+                        name: '查看',
+                        basic: true,
+                        permission: 'system:role:query'
+                    }
+                ]
+            }, {
+                path: '/model/beacon',
+                name: '信标清单',
+                icon: 'el-icon-fa-user',
+                opts: [
+                    {
+                        name: '查看',
+                        basic: true,
+                        permission: 'system:role:query'
+                    }
+                ]
+            }
+        ]
+    },
+        // 系统集成
+        {
+            path: '/point',
+            name: '系统集成',
+            icon: 'el-icon-fa-bank',
+            children: [
+                {
+                    path: '/point/pointsetting',
+                    name: '点位表配置工具',
+                    icon: 'el-icon-fa-user',
+                    opts: [
+                        {
+                            name: '查看',
+                            basic: true,
+                            permission: 'system:role:query'
+                        }
+                    ]
+                }, {
+                    path: '/point/dynamicdata',
+                    name: '动态数据关联',
+                    icon: 'el-icon-fa-user',
+                    opts: [
+                        {
+                            name: '查看',
+                            basic: true,
+                            permission: 'system:role:query'
+                        }
+                    ]
+                }
+            ]
+        },
+    //扫楼作业
+    {
+        path: '/floor',
+        name: '扫楼作业',
+        icon: 'el-icon-fa-bank',
+        children: [
+            {
+                path: '/floor/data',
+                name: '扫楼数据管理',
+                icon: 'el-icon-fa-user',
+                opts: [
+                    {
+                        name: '查看',
+                        basic: true,
+                        permission: 'system:role:query'
+                    }
+                ]
+            },
+            {
+                path: '/floor/plan',
+                name: '楼层平面图管理',
+                icon: 'el-icon-fa-user',
+                opts: [
+                    {
+                        name: '查看',
+                        basic: true,
+                        permission: 'system:role:query'
+                    }
+                ]
+            },
+            {
+                path: '/floor/abnormalprop',
+                name: '异常资产清单',
+                icon: 'el-icon-fa-user',
+                opts: [
+                    {
+                        name: '查看',
+                        basic: true,
+                        permission: 'system:role:query'
+                    }
+                ]
+            },
+            {
+                path: '/floor/log',
+                name: '扫楼日志查看',
+                icon: 'el-icon-fa-user',
+                opts: [
+                    {
+                        name: '查看',
+                        basic: true,
+                        permission: 'system:role:query'
+                    }
+                ]
+            }
+        ]
+    },
+        //台账管理
+        {
+            path: '/ledger',
+            name: '台账管理',
+            icon: 'el-icon-fa-bank',
+            children: [
+                {
+                    path: '/ledger/facility',
+                    name: '设备清单',
+                    icon: 'el-icon-fa-user',
+                    opts: [
+                        {
+                            name: '查看',
+                            basic: true,
+                            permission: 'system:role:query'
+                        }
+                    ]
+                },
+                {
+                    path: '/ledger/property',
+                    name: '资产清单',
+                    icon: 'el-icon-fa-user',
+                    opts: [
+                        {
+                            name: '查看',
+                            basic: true,
+                            permission: 'system:role:query'
+                        }
+                    ]
+                },
+                {
+                    path: '/ledger/cenotelist',
+                    name: '竖井清单',
+                    icon: 'el-icon-fa-user',
+                    opts: [
+                        {
+                            name: '查看',
+                            basic: true,
+                            permission: 'system:role:query'
+                        }
+                    ]
+                },
+                {
+                    path: '/ledger/dimension',
+                    name: '元空间管理',
+                    icon: 'el-icon-fa-user',
+                    opts: [
+                        {
+                            name: '查看',
+                            basic: true,
+                            permission: 'system:role:query'
+                        }
+                    ]
+                }, 
+                {
+                    path: '/ledger/rubbish',
+                    name: '垃圾数据检查',
+                    icon: 'el-icon-fa-user',
+                    opts: [
+                        {
+                            name: '查看',
+                            basic: true,
+                            permission: 'system:role:query'
+                        }
+                    ]
+                }, 
+                {
+                    path: '/ledger/updowncheck',
+                    name: '上下级关系检查',
+                    icon: 'el-icon-fa-user',
+                    opts: [
+                        {
+                            name: '查看',
+                            basic: true,
+                            permission: 'system:role:query'
+                        }
+                    ]
+                }                
+                
+            ]
+        },
+    //业务相关
+    {
+        path: '/busgroup',
+        name: '业务相关',
+        disabled: true,
+    },
+        //业务空间管理
+        {
+            path: '/business',
+            name: '业务空间管理',
+            icon: 'el-icon-fa-bank',
+            children: [
+                {
+                    path: '/business/spacelist',
+                    name: '业务空间清单',
+                    icon: 'el-icon-fa-user',
+                    opts: [
+                        {
+                            name: '查看',
+                            basic: true,
+                            permission: 'system:role:query'
+                        }
+                    ]
+                },
+            ]
+        },
+        //租户管理
+        {
+            path: '/rent',
+            name: '租户管理',
+            icon: 'el-icon-fa-bank',
+            children: [
+                {
+                    path: '/rent/rentlist',
+                    name: '租户清单',
+                    icon: 'el-icon-fa-user',
+                    opts: [
+                        {
+                            name: '查看',
+                            basic: true,
+                            permission: 'system:role:query'
+                        }
+                    ]
+                },
+                // {
+                //     path: '/ren',
+                //     name: '二级页面',
+                //     icon: 'el-icon-fa-user',
+                //     children: [
+                //         {
+                //             path: '/fewfewgf',
+                //             name: '三级页面1-1',
+                //             icon: '',
+                //             opts: [
+                //                 {
+                //                     name: '查看',
+                //                     basic: true,
+                //                     permission: 'system:role:query'
+                //                 }
+                //             ]
+                //         },
+                //         {
+                //             path: '/ledger/cenoteadd',
+                //             name: '三级页面1-2',
+                //             icon: '',
+                //             opts: [
+                //                 {
+                //                     name: '查看',
+                //                     basic: true,
+                //                     permission: 'system:role:query'
+                //                 }
+                //             ]
+                //         }
+                //     ]
+                // }
+            ]
+        },
+        //系统管理
+        {
+            path: '/system',
+            name: '系统管理',
+            icon: 'el-icon-fa-bank',
+            children: [
+                {
+                    path: '/system/list',
+                    name: '系统清单',
+                    icon: 'el-icon-fa-user',
+                    opts: [
+                        {
+                            name: '查看',
+                            basic: true,
+                            permission: 'system:role:query'
+                        }
+                    ]
+                },
+            ]
+        },
+   
+]

+ 12 - 6
src/framework/layout/PageSidebar.vue

@@ -17,30 +17,30 @@
             <template v-for='menu in menus'>
                 <el-submenu v-if='menu.children' :index='menu.path' :key='menu.path' class='sidebar-menu-submenu'>
                     <template slot='title'>
-                        <i v-if='menu.icon' :class='"el-icon-fa "+ menu.icon'></i>
+                        <i v-if='menu.icon' :class='"iconfont "+ menu.icon'></i>
                         <span>{{menu.name}}</span>
                     </template>
                     <template v-for='submenu in menu.children'>
                         <el-submenu v-if='submenu.children' :index='submenu.path' :key='submenu.path' class='sidebar-menu-submenu'>
                             <template slot='title'>
-                                <i v-if='submenu.icon' :class='"el-icon-fa "+ submenu.icon'></i>
+                                <i v-if='submenu.icon' :class='"iconfont "+ submenu.icon'></i>
                                 <span>{{submenu.name}}</span>
                             </template>
                             <template v-for='threemenu in submenu.children'>
                                 <el-menu-item :index='threemenu.path' :key='threemenu.path' class='sidebar-menu-item'>
-                                    <i v-if='threemenu.icon' :class='"el-icon-fa "+ threemenu.icon'></i>
+                                    <i v-if='threemenu.icon' :class='"iconfont "+ threemenu.icon'></i>
                                     <span slot='title'>{{threemenu.name}}</span>
                                 </el-menu-item>
                             </template>
                         </el-submenu>
                         <el-menu-item v-else :index='submenu.path' :key='submenu.path' class='sidebar-menu-item'>
-                            <i v-if='submenu.icon' :class='"el-icon-fa "+ submenu.icon'></i>
+                            <i v-if='submenu.icon' :class='"iconfont "+ submenu.icon'></i>
                             <span slot='title'>{{submenu.name}}</span>
                         </el-menu-item>
                     </template>
                 </el-submenu>
-                <el-menu-item v-else :index='menu.path' :key='menu.path' class='sidebar-menu-item' disabled>
-                    <i v-if='menu.icon' :class='"el-icon-fa "+ menu.icon'></i>
+                <el-menu-item v-else :index='menu.path' :key='menu.path' class='sidebar-menu-item' :disabled="menu.disabled">
+                    <i v-if='menu.icon' :class='"iconfont "+ menu.icon'></i>
                     <span slot='title'>{{menu.name}}</span>
                 </el-menu-item>
             </template>
@@ -88,4 +88,10 @@ export default {
     components: {}
 }
 </script>
+<style>
+.page-sidebar-wrapper .el-menu-item, .el-submenu__title {
+    height: 40px;
+    line-height: 40px;
+}
+</style>
 

+ 3 - 1
src/framework/style/layout.scss

@@ -83,6 +83,7 @@ body {
             display: inline-block;
             .logo-default {
                 margin: 18px 0 0;
+                height: 18px;
             }
         }
         .menu-toggler.sidebar-toggler {
@@ -131,6 +132,7 @@ body {
 #page-main .page-container #page-sidebar-wrapper {
     .sidebar-menu.el-menu {
         border-right: none;
+        padding-bottom: 10px;
         .el-submenu {
             .el-menu-item {
                 height: $pageSidebarItemHeight;
@@ -193,7 +195,7 @@ body {
     >.data-table {
         // flex-grow: 1;
         // flex-shrink: 1;
-        height: calc(100% - 52px);
+        height: calc(100% - 54px);
         // overflow-x: auto;
         // overflow-y: auto;
         background: #fff;

+ 3 - 1
src/main.js

@@ -4,12 +4,14 @@ import Vue from 'vue'
 import App from './App'
 import router from './router'
 import store from './store'
-
+import 'element-ui/lib/theme-chalk/base.css';
+import CollapseTransition from 'element-ui/lib/transitions/collapse-transition';
 import ElementUI from 'element-ui'
 import 'element-ui/lib/theme-chalk/index.css'
 import './framework/style/awesome.less'
 Vue.use(ElementUI, { size: "small", zIndex: 1000 })
 
+Vue.component(CollapseTransition.name, CollapseTransition)
 import './framework/style/layout.scss'
 
 import '@/assets/style/style.scss'

+ 275 - 192
src/router/system.js

@@ -7,56 +7,115 @@ import UserList from '@/views/system/user/UserList'
 import RoleList from '@/views/system/role/RoleList'
 import ChangePwd from '@/views/system/pwd/ChangePwd'
 
-/**点位部分 */
-import pointConfig from '@/views/point/config_point'
-import editDataSouce from '@/views/point/config_point/edit_origin'
-import pointSteps from '@/views/point/config_point/steps'
+/**项目管理 */
+import projectAdm from '@/views/platfrom/project'
+import userAdm from '@/views/platfrom/user'
+import roleAdm from '@/views/platfrom/role'
 
-/**项目化配置 */
-import collectsetting from '@/views/project_setting/collection_setting/index'
+/**前期准备 */
+import buildFloor from '@/views/ready/buildfloor'
+import collectsetting from '@/views/ready/collectsetting'
+import buildUser from '@/views/ready/appuser'
 
 /**模型管理 */
-import  modelFile from '@/views/model/file/index'
+import modelFile from '@/views/model/file'
+import modelReport from '@/views/model/report'
 
-/** 业务空间 */
-import spacelist from '@/views/business_space/business_list'
+/**系统集成 */
+import pointConfig from '@/views/point/config_point'
+import editDataSouce from '@/views/point/config_point/edit_origin'
+import pointSteps from '@/views/point/config_point/steps'
+import objectData from '@/views/point/objectData'
+import integrateReport from '@/views/point/report'
+import dynamicdata from '@/views/point/dynamicdata'
+import equipRela from '@/views/point/dynamicdata/addRelation/equipRela'
 
-/** 扫楼数据整理 */
+/** 扫楼作业 */
+import buildTask from '@/views/data_admin/buildTask'
 import buildAssets from '@/views/data_admin/buildAssets'
 import buildLog from '@/views/data_admin/buildLog'
-import buildUser from '@/views/data_admin/buildUser'
 import buildData from '@/views/data_admin/buildData'
 import buildGraphy from '@/views/data_admin/buildGraphy'
 
-/**市场及商务 */
-const OwnerManage = () =>
-    import ('@/views/market/owner/manage')
-
 /**  台账管理 */
-import systemLedger from '@/views/ledger/system/index'
-import dialogAssets from '@/views/ledger/system/addsystem'
-import facilityLedger from '@/views/ledger/facility/index'
-import partsLedger from '@/views/ledger/facility/parts/index'
-import partsmanageLedger from '@/views/ledger/facility/partsmanage/index'
-import addparts from '@/views/ledger/facility/partsmanage/addparts/index'
-import dialogDevice from '@/views/ledger/facility/addfacility'
-import propertyLedger from '@/views/ledger/property/index'
-import dialogSystem from '@/views/ledger/property/addproperty'
-import cenotelist from '@/views/ledger/cenotelist/index' //竖井清单
-import cenoteadd from '@/views/ledger/cenotelist/cenoteadd/index' //添加竖井
+import systemLedger from '@/views/ledger/system'
+import systemadd from '@/views/ledger/system/addsystem'
+import facilityLedger from '@/views/ledger/facility'
+import partsLedger from '@/views/ledger/facility/parts'
+import partsmanageLedger from '@/views/ledger/facility/partsmanage'
+import partsadd from '@/views/ledger/facility/partsmanage/addparts'
+import deviceadd from '@/views/ledger/facility/addfacility'
+import propertyadd from '@/views/ledger/property/addproperty'
+import propertyLedger from '@/views/ledger/property'
+import spacelist from '@/views/ledger/spacelist'//业务空间台账
+import addPropertys from '@/views/ledger/property/addpropertys'//根据未关联资产的设备或部件批量创建设备
+import cenotelist from '@/views/ledger/cenotelist' //竖井清单
+import cenoteadd from '@/views/ledger/cenotelist/cenoteadd' //添加竖井
+import rentlist from '@/views/ledger/rentlist' //租户清单
+import rentadd from '@/views/ledger/rentlist/rentadd' //竖井清单
+import dataReport from '@/views/ledger/report'
 import auth from '@/views/system/auth'
 import noUser from '@/views/system/nouser'
 
-/** 租户管理 */
-import rentlist from '@/views/rent/rentlist/index'
-import rentadd from '@/views/rent/rentlist/rentadd/index'
+/**  关系维护并计算 */
+import maintain from '@/views/relation/maintain'
+import overView from '@/views/relation/overview'
 
+/**  厂家库 */
+import supplier from '@/views/manufactor/supplier'
+
+/**市场及商务 */
+const OwnerManage = () =>
+    import ('@/views/market/owner/manage')
 
 export default [
     { path: '/', name: '', component: LayoutMain, children: [{ path: '', name: 'blank', component: Dasboard }] },
     //{ path: '/login', name: 'Login', component: Login },
     { path: '/auth', name: 'auth', component: auth },
     { path: '/noUser', name: 'noUser', component: noUser },
+    // 平台管理
+    {
+        path: '/platform',
+        name: 'LayoutMain',
+        component: LayoutMain,
+        children: [
+            { path: 'project', name: 'projectAdm', component: projectAdm, meta: { keepAlive: false, breadcrumbs: [{ label: '项目管理' }] }},
+            { path: 'user', name: 'userAdm', component: userAdm, meta: { keepAlive: false, breadcrumbs: [{ label: '人员管理' }] }},
+            { path: 'role', name: 'roleAdm', component: roleAdm, meta: { keepAlive: false, breadcrumbs: [{ label: '角色管理' }] }}
+        ] 
+    },
+    // 前期准备
+    {
+        path: '/ready',
+        name: 'LayoutMain',
+        component: LayoutMain,
+        children: [
+            { path: 'buildfloor', name: 'buildFloor', component: buildFloor, meta: { keepAlive: false, breadcrumbs: [{ label: '建筑楼层管理' }] }},
+            { path: 'collectsetting', name: 'collectsetting', component: collectsetting, meta: { keepAlive: false, breadcrumbs: [{ label: '需采集的信息点' }] }},
+            { path: 'appuser', name: 'buildUser', component: buildUser, meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼App用户管理' }] }}
+        ] 
+    },
+    //模型管理
+    {
+        path: '/model',
+        name: 'LayoutMain',
+        component: LayoutMain,
+        children: [
+            { path: '', name: 'modelFile', component: modelFile },
+            {
+                path: 'file',
+                name: 'modelFile',
+                component: modelFile,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '模型管理', path: '/model/file' }, { label: '模型文件管理' }] }
+            },
+            {
+                path: 'report',
+                name: 'modelReport',
+                component: modelReport,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '模型管理', path: '/model/file' }, { label: '模型质量报告' }] }
+            }
+        ]
+    },
     // 系统集成
     {
         path: '/point',
@@ -66,83 +125,74 @@ export default [
             { path: '', name: 'pointConfig', component: pointConfig },
             {
                 path: 'pointsetting',
-                name: 'Dasboard',
+                name: 'pointConfig',
                 component: pointConfig,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '系统集成', path: '/point/pointsetting' }, { label: '点位表配置工具' }] }
+                meta: { keepAlive: false, breadcrumbs: [{ label: '系统集成', path: '/point/pointsetting' }, { label: '子系统点位接入' }] }
             },
             { path: 'editDataSouce', name: 'editDataSouce', component: editDataSouce },
             { path: 'pointSteps', name: 'pointSteps', component: pointSteps },
             {
                 path: 'dynamicdata',
                 name: 'dynamicdata',
-                component: Dasboard,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '系统集成', path: '/point/pointsetting' }, { label: '动态数据关联' }] }
-            }
-        ]
-    },
-    //项目化配置
-    {
-        path: '/proj',
-        name: 'LayoutMain',
-        component: LayoutMain,
-        children: [
-            { path: '', name: 'Dasboard', component: Dasboard },
+                component: dynamicdata,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '系统集成', path: '/point/pointsetting' }, { label: '配置动参从点位取值' }] }
+            },
             {
-                path: 'custominfo',
-                name: 'Dasboard',
-                component: Dasboard,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '项目基础设置', path: '/proj/collectsetting' }, { label: '自定义信息点' }] }
+                path: 'equipRela',
+                name: 'equipRela',
+                component: equipRela,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '系统集成', path: '/point/pointsetting' }, { label: '配置动参从点位取值', path: '/point/dynamicdata' }, { label: '处理未对应实例对象标识'}] }
             },
             {
-                path: 'collectsetting',
-                name: 'collectsetting',
-                component: collectsetting,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '项目基础设置', path: '/proj/collectsetting' }, { label: '项目需采集的信息点' }] }
+                path: 'objectdata',
+                name: 'objectData',
+                component: objectData,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '系统集成', path: '/point/pointsetting' }, { label: '配置动参从对象取值' }] }
             },
             {
-                path: 'floorinfo',
-                name: 'Dasboard',
-                component: Dasboard,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '项目基础设置', path: '/proj/collectsetting' }, { label: '楼层信息管理' }] }
+                path: 'report',
+                name: 'integrateReport',
+                component: integrateReport,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '系统集成', path: '/point/pointsetting' }, { label: '系统集成成果管理' }] }
             }
         ]
     },
-    //模型管理
+    //扫楼数据管理
     {
-        path: '/model',
+        path: '/floor',
         name: 'LayoutMain',
         component: LayoutMain,
         children: [
-            { path: '', name: 'Dasboard', component: Dasboard },
+            { path: '', name: 'buildData', component: buildData },
             {
-                path: 'file',
-                name: 'modelFile',
-                component: modelFile,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '模型管理', path: '/model/file' }, { label: '模型文件管理' }] }
+                path: 'task',
+                name: 'buildTask',
+                component: buildTask,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼作业', path: '/floor/task' }, { label: '现场任务管理' }] }
             },
             {
-                path: 'noentity',
-                name: 'collectsetting',
-                component: Dasboard,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '模型管理', path: '/model/file' }, { label: '未实体化模型清单' }] }
+                path: 'data',
+                name: 'buildData',
+                component: buildData,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼作业', path: '/floor/task' }, { label: '现场数据整理', path: '/floor/data' }, { label: '信息点整理' }] }
             },
             {
-                path: 'beforemodel',
-                name: 'Dasboard',
-                component: Dasboard,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '模型管理', path: '/model/file' }, { label: '待建模清单' }] }
+                path: 'plan',
+                name: 'buildGraphy',
+                component: buildGraphy,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼作业', path: '/floor/task' }, { label: '现场数据整理', path: '/floor/data' }, { label: '位置标签整理' }] }
             },
             {
-                path: 'modelrule',
-                name: 'Dasboard',
-                component: Dasboard,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '模型管理', path: '/model/file' }, { label: '拓扑检查' }] }
+                path: 'abnormalprop',
+                name: 'buildAssets',
+                component: buildAssets,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼作业', path: '/floor/task' }, { label: '扫楼报告' }] }
             },
             {
-                path: 'beacon',
-                name: 'Dasboard',
-                component: Dasboard,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '模型管理', path: '/model/file' }, { label: '信标清单' }] }
+                path: 'log',
+                name: 'buildLog',
+                component: buildLog,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼作业', path: '/floor/task' }, { label: '扫楼日志查看' }] }
             }
         ]
     },
@@ -157,7 +207,7 @@ export default [
                 path: 'facility',
                 name: 'facilityLedger',
                 component: facilityLedger,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '设备清单' }] }
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '设备台账' }] }
             },
             {
                 path: 'parts',
@@ -172,138 +222,189 @@ export default [
                 meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '管理部件' }] },
             },
             {
-                path: 'addparts',
-                name: 'addparts',
-                component: addparts,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '添加部件' }] },
+                path: 'partsadd',
+                name: 'partsadd',
+                component: partsadd,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '设备台账', path: '/ledger/facility' }, { label: '添加部件' }] },
             },
-            
             {
-                path: 'addevice',
-                name: 'dialogDevice',
-                component: dialogDevice,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '设备清单', path: '/ledger/facility' }, { label: '添加设备' }] }
+                path: 'deviceadd',
+                name: 'deviceadd',
+                component: deviceadd,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '设备台账', path: '/ledger/facility' }, { label: '添加设备' }] }
             },
-
             {
                 path: 'property',
                 name: 'propertyLedger',
                 component: propertyLedger,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '资产清单' }] }
-            },
-            {
-                path: 'property/addproperty',
-                name: 'dialogSystem',
-                component: dialogSystem,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '资产台账' }] }
             },
-
             {
-                path: 'cenotelist',
-                name: 'cenotelist',
-                component: cenotelist,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '竖井清单' }] }
+                path: 'propertyadd',
+                name: 'propertyadd',
+                component: propertyadd,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '资产台账', path: '/ledger/property' }, { label: '添加资产' }] }
             },
             {
-                path: 'cenoteadd',
-                name: 'cenoteadd',
-                component: cenoteadd,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '竖井清单', path: '/ledger/cenotelist' }, { label: '添加竖井' }] }
+                path: 'addPropertys',
+                name: 'addPropertys',
+                component: addPropertys,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '资产台账', path: '/ledger/property' }, { label: '批量创建' }] }
             },
             {
-                path: 'dimension',
-                name: 'Dasboard',
-                component: Dasboard,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '元空间管理' }] }
+                path: 'list',
+                name: 'systemlist',
+                component: systemLedger,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '系统台账' }] }
             },
             {
-                path: 'rubbish',
-                name: 'Dasboard',
-                component: Dasboard,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '垃圾数据检查' }] }
+                path: 'systemadd',
+                name: 'systemadd',
+                component: systemadd,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '系统台账', path: '/ledger/list' }, { label: '添加系统' }] }
             },
             {
-                path: 'updowncheck',
-                name: 'Dasboard',
-                component: Dasboard,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '上下级关系检查' }] }
-            }
-        ]
-    },
-    //业务空间管理
-    {
-        path: '/business',
-        name: 'LayoutMain',
-        component: LayoutMain,
-        children: [
-            { path: '', name: 'Dasboard', component: Dasboard },
-            {
                 path: 'spacelist',
                 name: 'spacelist',
                 component: spacelist,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '业务空间管理', path: '/business/spacelist' }, { label: '业务空间清单' }] }
-            }
-        ]
-    },
-    //租户管理
-    {
-        path: '/rent',
-        name: 'LayoutMain',
-        component: LayoutMain,
-        children: [
-            { path: '', name: 'Dasboard', component: Dasboard },
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '业务空间台账' }] }
+            },
+            {
+                path: 'cenotelist',
+                name: 'cenotelist',
+                component: cenotelist,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '竖井台账' }] }
+            },
+            {
+                path: 'cenoteadd',
+                name: 'cenoteadd',
+                component: cenoteadd,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '竖井台账', path: '/ledger/cenotelist' }, { label: '添加竖井' }] }
+            },
             {
                 path: 'rentlist',
                 name: 'rentlist',
                 component: rentlist,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '租户管理', path: '/rent/rentlist' }, { label: '租户清单' }] }
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '租户台账' }] }
             },
             {
                 path: 'rentadd',
                 name: 'rentadd',
                 component: rentadd,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '租户管理', path: '/rent/rentlist' }, { label: '租户清单', path: '/rent/rentlist' }, { label: '添加租户' }] }
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '租户台账', path: '/ledger/rentlist' }, { label: '添加租户' }] }
+            },
+            {
+                path: 'datareport',
+                name: 'dataReport',
+                component: dataReport,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '数据质量报告' }] }
             }
         ]
     },
-    //扫楼数据管理
+    /******************** 关系维护并计算 ***************************/
+    //关系维护
     {
-        path: '/floor',
+        path: '/relation',
         name: 'LayoutMain',
         component: LayoutMain,
         children: [
-            { path: '', name: 'buildData', component: buildData },
-            {
-                path: 'data',
-                name: 'buildData',
-                component: buildData,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼作业', path: '/floor/data' }, { label: '扫楼数据管理' }] }
-            },
-            {
-                path: 'plan',
-                name: 'buildGraphy',
-                component: buildGraphy,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼作业', path: '/floor/data' }, { label: '楼层平面图管理' }] }
-            },
-            {
-                path: 'abnormalprop',
-                name: 'buildAssets',
-                component: buildAssets,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼作业', path: '/floor/data' }, { label: '异常资产清单' }] }
-            },
-            {
-                path: 'log',
-                name: 'buildLog',
-                component: buildLog,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼作业', path: '/floor/data' }, { label: '扫楼日志查看' }] }
-            },
-            {
-                path: 'appuser',
-                name: 'buildUser',
-                component: buildUser,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '项目基础设置', path: '/proj/collectsetting' }, { label: '扫楼App用户管理' }] }
-            }
-        ]
+            { path: 'maintain', name: 'maintain', component: maintain, meta: { keepAlive: false, breadcrumbs: [{ label: '关系维护' }] }},
+            { path: 'overview', name: 'overView', component: overView, meta: { keepAlive: false, breadcrumbs: [{ label: '全部关系总览' }] }}
+        ] 
     },
+    /******************** 通用字典 ***************************/
+    //厂家库
+    // {
+    //     path: '/manufactor',
+    //     name: 'LayoutMain',
+    //     component: LayoutMain,
+    //     children: [
+    //         { path: 'supplier', name: 'supplier', component: supplier, meta: { keepAlive: false, breadcrumbs: [{ label: '厂家库' }] }}
+    //     ] 
+    // },
+
+    //业务空间管理
+    // {
+    //     path: '/business',
+    //     name: 'LayoutMain',
+    //     component: LayoutMain,
+    //     children: [
+    //         { path: '', name: 'Dasboard', component: Dasboard },
+    //         {
+    //             path: 'spacelist',
+    //             name: 'spacelist',
+    //             component: spacelist,
+    //             meta: { keepAlive: false, breadcrumbs: [{ label: '业务空间管理', path: '/business/spacelist' }, { label: '业务空间清单' }] }
+    //         }
+    //     ]
+    // },
+    //租户管理
+    // {
+    //     path: '/rent',
+    //     name: 'LayoutMain',
+    //     component: LayoutMain,
+    //     children: [
+    //         { path: '', name: 'Dasboard', component: Dasboard },
+    //         {
+    //             path: 'rentlist',
+    //             name: 'rentlist',
+    //             component: rentlist,
+    //             meta: { keepAlive: false, breadcrumbs: [{ label: '租户管理', path: '/rent/rentlist' }, { label: '租户清单' }] }
+    //         },
+    //         {
+    //             path: 'rentadd',
+    //             name: 'rentadd',
+    //             component: rentadd,
+    //             meta: { keepAlive: false, breadcrumbs: [{ label: '租户管理', path: '/rent/rentlist' }, { label: '租户清单', path: '/rent/rentlist' }, { label: '添加租户' }] }
+    //         }
+    //     ]
+    // },
+    //系统管理
+    // {
+    //     path: '/system',
+    //     name: 'LayoutMain',
+    //     component: LayoutMain,
+    //     children: [{
+    //             path: 'list',
+    //             name: 'systemlist',
+    //             component: systemLedger,
+    //             meta: { keepAlive: false, breadcrumbs: [{ label: '系统管理', path: '/system/list' }, { label: '系统清单' }] }
+    //         },
+    //         {
+    //             path: 'systemadd',
+    //             name: 'systemadd',
+    //             component: systemadd,
+    //             meta: { keepAlive: false, breadcrumbs: [{ label: '系统管理', path: '/system/list' }, { label: '系统清单', path: '/system/list' }, { label: '添加系统' }] }
+    //         },
+    //     ]
+    // },
+    //项目化配置
+    // {
+    //     path: '/proj',
+    //     name: 'LayoutMain',
+    //     component: LayoutMain,
+    //     children: [
+    //         { path: '', name: 'Dasboard', component: Dasboard },
+    //         {
+    //             path: 'custominfo',
+    //             name: 'Dasboard',
+    //             component: Dasboard,
+    //             meta: { keepAlive: false, breadcrumbs: [{ label: '项目基础设置', path: '/proj/collectsetting' }, { label: '自定义信息点' }] }
+    //         },
+    //         {
+    //             path: 'collectsetting',
+    //             name: 'collectsetting',
+    //             component: collectsetting,
+    //             meta: { keepAlive: false, breadcrumbs: [{ label: '项目基础设置', path: '/proj/collectsetting' }, { label: '项目需采集的信息点' }] }
+    //         },
+    //         {
+    //             path: 'floorinfo',
+    //             name: 'Dasboard',
+    //             component: Dasboard,
+    //             meta: { keepAlive: false, breadcrumbs: [{ label: '项目基础设置', path: '/proj/collectsetting' }, { label: '楼层信息管理' }] }
+    //         }
+    //     ]
+    // },
     //环境调节
     {
         path: '/environment',
@@ -323,23 +424,5 @@ export default [
             { path: '', name: 'Dasboard', component: Dasboard },
             { path: 'own', name: 'Dasboard', component: OwnerManage }
         ]
-    },
-    //系统管理
-    {
-        path: '/system',
-        name: 'LayoutMain',
-        component: LayoutMain,
-        children: [{
-                path: 'list',
-                name: 'systemlist',
-                component: systemLedger,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '系统管理', path: '/system/list' }, { label: '系统清单' }] }
-            },
-            {
-                path: '/system/list/addsystem',
-                name: 'dialogAssets',
-                component: dialogAssets,
-            },
-        ]
     }
 ]

+ 6 - 2
src/utils/authutils.js

@@ -55,8 +55,12 @@ export default {
                     store.dispatch('setBreadcrumb', to.meta.breadcrumbs)
                 }
                 if(
-                    (from.path == "/rent/rentadd" && session.get("rentAddData") && session.get("rentAddData").length) ||
-                    (from.path == "/ledger/cenoteadd" && session.get("cenoteAddData") && session.get("cenoteAddData").length)
+                    (from.path == "/ledger/rentadd" && session.get("rentAddData") && session.get("rentAddData").length) ||
+                    (from.path == "/ledger/cenoteadd" && session.get("cenoteAddData") && session.get("cenoteAddData").length) ||
+                    (from.path == "/ledger/deviceadd" && session.get("deviceAddData") && session.get("deviceAddData").length) ||
+                    (from.path == "/ledger/propertyadd" && session.get("propertyAddData") && session.get("propertyAddData").length) ||
+                    (from.path == "/ledger/partsadd" && session.get("partsAddData") && session.get("partsAddData").length) ||
+                    (from.path == "/ledger/systemadd" && session.get("systemAddData") && session.get("systemAddData").length)
                 ) { //判断新增信息是否保存
                     MessageBox.confirm("新增信息未保存,离开将丢失新增信息,是否继续?", "提示", {
                         confirmButtonText: '确定',

+ 133 - 0
src/utils/handsontable/buildFloorData.js

@@ -0,0 +1,133 @@
+import { floorQuery, buildingQuery } from '@/api/scan/request'
+
+const buildFloor = {
+  getData: function (buildFloorData) {
+    let data, buildParams = {
+        PageNumber: 1,
+        PageSize: 500,
+        Projection: [
+            "BuildID",
+            "BuildLocalName"
+        ]
+    }, floorParams = {
+        Orders: "FloorSequenceID desc",
+        PageNumber: 1,
+        PageSize: 500,
+        Projection: [
+            "BuildID",
+            "FloorID",
+            "FloorLocalName",
+            "FloorSequenceID"
+        ]
+    }
+
+    let promise1 = new Promise((resolve, reject) => {
+      buildingQuery(buildParams, res => {
+        resolve(res)
+      })
+    })
+    let promise2 = new Promise((resolve, reject) => {
+      floorQuery(floorParams, res => {
+        resolve(res)
+      })
+    })
+
+    Promise.all([promise1, promise2]).then(function(values) {
+      let builData = values[0].Content, floorData = values[1].Content
+      data = builData.map(build => {
+          return {
+              value: build.BuildID,
+              label: build.BuildLocalName
+          }
+      })
+      data.unshift({
+        value: "",
+        label: "未明确建筑的设备"
+      })
+      data.forEach(build => {
+        floorData.forEach(floor => {
+            if (build.value == floor.BuildID && floor.FloorID && floor.FloorLocalName) {
+                if (build.children) {
+                    build.children.push({
+                        value: floor.FloorID,
+                        label: floor.FloorLocalName
+                    })
+                } else {
+                    build.children = []
+                    build.children.push({
+                        value: "",
+                        label: "未明确楼层的设备"
+                    })
+                }
+            }
+        })
+      })
+      data.forEach(item => {
+        if (item.children && item.children.length) {
+          item.children.forEach(child => {
+            buildFloorData.push({
+              Code: item.value + "-" + child.value,
+              Name: item.label + "-" + child.label
+            })
+          })
+        } else {
+          buildFloorData.push({
+            Code: item.value,
+            Name: item.label
+          })
+        }
+      })
+    })
+    // buildingQuery(buildParams, res => {
+    //   let builData = res.Content
+    //   data = builData.map(build => {
+    //       return {
+    //           value: build.BuildID,
+    //           label: build.BuildLocalName
+    //       }
+    //   })
+    //   data.unshift({
+    //     value: "",
+    //     label: "未明确建筑的设备"
+    //   })
+    //   floorQuery(floorParams, res => {
+    //       let floorData = res.Content
+    //       data.forEach(build => {
+    //           floorData.forEach(floor => {
+    //               if (build.value == floor.BuildID && floor.FloorID && floor.FloorLocalName) {
+    //                   if (build.children) {
+    //                       build.children.push({
+    //                           value: floor.FloorID,
+    //                           label: floor.FloorLocalName
+    //                       })
+    //                   } else {
+    //                       build.children = []
+    //                       build.children.push({
+    //                           value: "",
+    //                           label: "未明确楼层的设备"
+    //                       })
+    //                   }
+    //               }
+    //           })
+    //       })
+    //       data.forEach(item => {
+    //         if (item.children && item.children.length) {
+    //           item.children.forEach(child => {
+    //             buildFloorData.push({
+    //               Code: item.value + "-" + child.value,
+    //               Name: item.label + "-" + child.label
+    //             })
+    //           })
+    //         } else {
+    //           buildFloorData.push({
+    //             Code: item.value,
+    //             Name: item.label
+    //           })
+    //         }
+    //       })
+    //   })
+    // })
+  }
+}
+
+export default buildFloor

+ 1 - 0
src/utils/handsontable/delType.js

@@ -3,6 +3,7 @@ let tagsFun = (instance, td, row, col, prop, value, cellProperties) => {
     if (!!value) {
         let arr = value || [],
             dom = ``;
+        arr = arr.sort()
         arr.map((item, index) => {
             if (index > 2) {
 

+ 52 - 5
src/utils/handsontable/fillterField.js

@@ -1,14 +1,61 @@
 const data = {
-  equipment: {
+  equipment: { //设备
     onlyRead: [],
-    edit: []
+    edit: [
+      "EquipID",
+      "EquipName",
+      "EquipQRCode",
+      "BIMID",
+      "BIMLocation"
+    ]
   },
-  tenant: {
+  tenant: { //租户
     onlyRead: [],
     edit: []
   },
-  shaft: {
+  shaft: { //竖井
     onlyRead: [],
     edit: []
+  },
+  parts: { //部件
+    onlyRead: [],
+    edit: [
+      "EquipID",
+      "EquipName",
+      "EquipQRCode",
+      "BIMID",
+      "BIMLocation"
+    ]
+  },
+  property:{ //资产
+    onlyRead: [],
+    edit: [
+      "EquipID",
+      "EquipName",
+      "EquipQRCode",
+      "BIMID",
+      "BIMLocation"
+    ]
+  },
+  system:{ //系统
+    onlyRead: [],
+    edit: [
+      "SysID",
+      "SysName",
+      "EquipQRCode",
+      "BIMID",
+      "BIMLocation"
+    ]
+  },
+  space:{//业务空间
+    onlyRead: [],
+    edit: [
+      "RoomID",
+      "RoomName",
+      "BIMID",
+      "BIMLocation"
+    ]
   }
-}
+}
+
+export default data

+ 19 - 2
src/utils/handsontable/mainText.js

@@ -61,11 +61,28 @@ const text = {
     },
     //四大厂商
     idType: (instance, td, row, col, prop, value, cellProperties) => {
+        let html = ''
+        switch (prop){
+            case 'DPManufacturerID':
+                html = instance.getDataAtRowProp(row,'LedgerParam.EquipManufactor.Specification') + '/' + instance.getDataAtRowProp(row,'LedgerParam.EquipManufactor.Brand')
+                break;
+            case 'DPSupplierID':
+                html = instance.getDataAtRowProp(row,'LedgerParam.SupplyPurchase.Supplier')
+                break;
+            case 'DPMaintainerID':
+                html = instance.getDataAtRowProp(row,'LedgerParam.OperationMainte.Maintainer')
+                break;
+            case 'DPInsurerID':
+                html = instance.getDataAtRowProp(row,'LedgerParam.InsuranceDoc.Insurer')
+                break;
+            default:
+                break;
+        }
         td.style.color = "#409EFF";
         td.style.cursor = "pointer";
         if (!!value) {
-            let data = value.split("-")[1] || "空名"
-            td.innerHTML = data
+            // let data = value.split("-")[1] || "空名"
+            td.innerHTML = html
         } else {
             td.innerHTML = "点击选择"
         }

+ 262 - 158
src/utils/handsontable/notShow.js

@@ -5,33 +5,10 @@ import fieldData from "@/utils/handsontable/fillterField"
 let InputModeArr = ["A1", "A2", "B1", "C5", "D1", "D2", "E1", "L", "L1", "L2", "F1", "F2", "M", "Own"]
 //在编辑模式下并且勾选隐藏自动填充的信息点不显示的字段
 let noShowArr = [
-        "Brand",
-        "Specification",
-        "Manufacturer",
-        "Supplier",
-        "SupplierContactor",
-        "SupplierPhone",
-        "SupplierEmail",
-        "SupplierWeb",
-        "SupplierFax",
-        "Maintainer",
-        "MaintainerContactor",
-        "MaintainerPhone",
-        "MaintainerEmail",
-        "MaintainerWeb",
-        "Principal",
-        "MaintainerFax",
-        "Insurer",
-        "InsurerContactor",
-        "InsurerPhone",
-        "InsurerEmail",
-        "InsurerWeb",
-        "InsurerFax",
-        "InsuranceFile",
-        "EquipID",
-        "EquipName",
-    ]
-    //在编辑模式下不显示的字段
+    "Specification",
+    "ServiceLife"
+]
+//在编辑模式下不显示的字段
 let cantShow = [
     "EquipQRCode",
     "EquipID",
@@ -68,6 +45,35 @@ let cantShow = [
     "ShaftID"
 ]
 
+//台账编辑页面不显示的厂商信息
+let firmArr = [
+    "Brand", //品牌
+    "Specification", //设备型号
+    "Manufacturer", //生产厂家
+    "Supplier", //供应商单位名称
+    "SupplierContactor", //供应商联系人
+    "SupplierPhone", //供应商联系电话
+    "SupplierEmail", //供应商电子邮件
+    "SupplierWeb", //供应商网址
+    "SupplierFax", //供应商传真
+    "Maintainer", //维修商单位名称
+    "MaintainerContactor", //维修商联系人
+    "MaintainerPhone", //维修商联系电话
+    "MaintainerEmail", //维修商电子邮件
+    "MaintainerWeb", //维修商网址
+    "MaintainerFax", //维修商传真
+    "Insurer", //保险公司名称
+    "InsurerContactor", //保险公司联系人
+    "InsurerPhone", //保险公司联系电话
+    'InsurerEmail', //保险公司电子邮件
+    "InsurerWeb", //保险公司网址
+    "InsurerFax" //保险公司传真
+    // "DPManufacturerID",//品牌型号Id
+    // "DPSupplierID",//供应商信息Id
+    // "DPMaintainerID",//维修商信息Id
+    // "DPInsurerID"//保险公司信息Id
+]
+
 let cutArr = [{
     name: "品牌型号",
     code: "DPManufacturerID",
@@ -87,23 +93,23 @@ let cutArr = [{
 }]
 
 let newData = [{
-        name: "品牌型号",
-        code: "DPManufacturerID",
-        num: 2,
-    }, {
-        name: "供应商信息",
-        code: "DPSupplierID",
-        num: 8
-    }, {
-        name: "维修商信息",
-        code: "DPMaintainerID",
-        num: 35
-    }, {
-        name: "保险公司信息",
-        code: "DPInsurerID",
-        num: 42
-    }]
-    //创建部件固定不显示-管理部件固定不显示(即编辑模式)
+    name: "品牌型号",
+    code: "DPManufacturerID",
+    num: 2,
+}, {
+    name: "供应商信息",
+    code: "DPSupplierID",
+    num: 8
+}, {
+    name: "维修商信息",
+    code: "DPMaintainerID",
+    num: 35
+}, {
+    name: "保险公司信息",
+    code: "DPInsurerID",
+    num: 42
+}]
+//创建部件固定不显示-管理部件固定不显示(即编辑模式)
 let partsAddNoShow = [
     'EquipID',
     'EquipName',
@@ -209,96 +215,101 @@ const showTools = {
         })
         return data
     },
-    arrToArr(arr) {
+    arrToArr(arr, showType) {
         let first = 0,
             scound = 0,
             three = 0,
             four = 0
-        arr.find(function(value, index, arr) {
+        arr.find(function (value, index, arr) {
+            let flag = (showType != "Visible" ||  value.Visible)
             if (
-                (value.InfoPointName == "品牌" ||
-                    value.InfoPointName == "设备型号" ||
-                    value.InfoPointName == "生产厂家") && !first
+                ((value.InfoPointCode == "Brand" && flag) ||
+                (value.InfoPointCode == "Specification" && flag) ||
+                (value.InfoPointCode == "Manufacturer" && flag)) && !first
             ) {
                 first = index
             }
             if (
-                (value.InfoPointName == "供应商单位名称" ||
-                    value.InfoPointName == "供应商联系人" ||
-                    value.InfoPointName == "供应商电子邮件" ||
-                    value.InfoPointName == "供应商网址" ||
-                    value.InfoPointName == "供应商传真" ||
-                    value.InfoPointName == "供应商联系电话") && !scound
+                ((value.InfoPointCode == "Supplier" && flag) ||
+                (value.InfoPointCode == "SupplierContactor" && flag) ||
+                (value.InfoPointCode == "SupplierEmail" && flag) ||
+                (value.InfoPointCode == "SupplierWeb" && flag) ||
+                (value.InfoPointCode == "SupplierFax" && flag) ||
+                (value.InfoPointCode == "SupplierPhone" && flag)) && !scound
             ) {
                 scound = index
             }
             if (
-                (value.InfoPointName == "维修商单位名称" ||
-                    value.InfoPointName == "维修商联系人" ||
-                    value.InfoPointName == "维修商联系电话" ||
-                    value.InfoPointName == "维修商电子邮件" ||
-                    value.InfoPointName == "维修商网址" ||
-                    value.InfoPointName == "维修商传真") && !three
+                ((value.InfoPointCode == "Maintainer" && flag) ||
+                (value.InfoPointCode == "MaintainerContactor" && flag) ||
+                (value.InfoPointCode == "MaintainerPhone" && flag) ||
+                (value.InfoPointCode == "MaintainerEmail" && flag) ||
+                (value.InfoPointCode == "MaintainerWeb" && flag) ||
+                (value.InfoPointCode == "MaintainerFax" && flag)) && !three
             ) {
                 three = index
             }
             if (
-                (value.InfoPointName == "保险公司名称" ||
-                    value.InfoPointName == "保险公司联系人" ||
-                    value.InfoPointName == "保险公司联系电话" ||
-                    value.InfoPointName == "保险公司电子邮件" ||
-                    value.InfoPointName == "保险公司网址" ||
-                    value.InfoPointName == "保险公司传真") && !four
+                ((value.InfoPointCode == "Insurer" && flag) ||
+                (value.InfoPointCode == "InsurerContactor" && flag) ||
+                (value.InfoPointCode == "InsurerPhone" && flag) ||
+                (value.InfoPointCode == "InsurerEmail" && flag) ||
+                (value.InfoPointCode == "InsurerWeb" && flag) ||
+                (value.InfoPointCode == "InsurerFax" && flag)) && !four
             ) {
                 four = index
             }
         })
         let numList = [first, scound, three, four]
         numList.reverse().map((item, index) => {
-            if (!!item) {
+            if (item) {
                 if (index == 0) {
                     arr.splice(item, 0, {
-                        InfoPointName: "保险公司信息",
+                        DataType: "Str",
+                        FirstName: "基本信息",
                         InfoPointCode: "DPInsurerID",
-                        Path: 'DPInsurerID',
-                        InputMode: "Own",
-                        Unit: "",
-                        SecondTag: "",
-                        FirstTag: "",
-                        Visible: true,
+                        InfoPointName: "保险公司信息",
+                        InputMode: "X",
+                        Path: "DPInsurerID",
+                        Priority: "S",
+                        Editable: true,
+                        Visible: true
                     })
                 } else if (index == 1) {
                     arr.splice(item, 0, {
-                        InfoPointName: "维修商信息",
+                        DataType: "Str",
+                        FirstName: "基本信息",
                         InfoPointCode: "DPMaintainerID",
-                        Path: 'DPMaintainerID',
-                        InputMode: "Own",
-                        Unit: "",
-                        SecondTag: "",
-                        FirstTag: "",
-                        Visible: true,
+                        InfoPointName: "维修商信息",
+                        InputMode: "X",
+                        Path: "DPMaintainerID",
+                        Priority: "S",
+                        Editable: true,
+                        Visible: true
                     })
                 } else if (index == 2) {
                     arr.splice(item, 0, {
-                        InfoPointName: "供应商信息",
+                        DataType: "Str",
+                        FirstName: "基本信息",
                         InfoPointCode: "DPSupplierID",
-                        Path: 'DPSupplierID',
-                        InputMode: "Own",
-                        Unit: "",
-                        SecondTag: "",
-                        FirstTag: "",
-                        Visible: true,
+                        InfoPointName: "供应商信息",
+                        InputMode: "X",
+                        Path: "DPSupplierID",
+                        Priority: "S",
+                        Editable: true,
+                        Visible: true
                     })
                 } else if (index == 3) {
                     arr.splice(item, 0, {
-                        InfoPointName: "品牌型号",
+                        DataType: "Str",
+                        FirstName: "基本信息",
                         InfoPointCode: "DPManufacturerID",
-                        Path: 'DPManufacturerID',
-                        InputMode: "Own",
-                        Unit: "",
-                        SecondTag: "",
-                        FirstTag: "",
-                        Visible: true,
+                        InfoPointName: "品牌型号",
+                        InputMode: "X",
+                        Path: "DPManufacturerID",
+                        Priority: "S",
+                        Editable: true,
+                        Visible: true
                     })
                 }
             }
@@ -354,8 +365,8 @@ const showTools = {
                             type: "numeric",
                             numericFormat: {
                                 pattern: "0,0.00"
-                                    // culture: 'de-DE' // use this for EUR (German),
-                                    // more cultures available on http://numbrojs.com/languages.html
+                                // culture: 'de-DE' // use this for EUR (German),
+                                // more cultures available on http://numbrojs.com/languages.html
                             }
                         };
                     } else if (item.InputMode == "C5") {
@@ -411,7 +422,9 @@ const showTools = {
             } else {
                 return false
             }
-            
+
+
+
 
         }).filter(item => item);
         return data
@@ -492,8 +505,8 @@ const showTools = {
                             type: "numeric",
                             numericFormat: {
                                 pattern: "0,0.00"
-                                    // culture: 'de-DE' // use this for EUR (German),
-                                    // more cultures available on http://numbrojs.com/languages.html
+                                // culture: 'de-DE' // use this for EUR (German),
+                                // more cultures available on http://numbrojs.com/languages.html
                             }
                         };
                     } else if (item.InputMode == "C5") {
@@ -846,12 +859,6 @@ const showTools = {
                             readOnly: onlyRead,
                             correctFormat: true
                         };
-                    } else if (item.InputMode == "Own" && !onlyRead) {
-                        return {
-                            data: item.Path,
-                            renderer: text.idType,
-                            readOnly: onlyRead
-                        }
                     } else {
                         return {
                             data: item.Path,
@@ -873,35 +880,45 @@ const showTools = {
      * @param {*} type 对应表格的模块类型
      * @param {*} onlyRead 是否只读
      * @param {*} showType 查看类型(全部;只看要采集的信息;隐藏部分信息)
-     * @param {*} taizhang 是否是台账类型
+     * @param {*} taizhang 是否是台账类型(默认为false)
      * 
      */
-    headerTextFilter (arr, type, onlyRead, showType, taizhang = false) {
+    headerTextFilter(arr, type, onlyRead, showType, taizhang = false) {
         if (taizhang && !onlyRead) {
-            arr = showTools.arrToArr(arr)
+            arr = this.arrToArr(arr, showType)
         }
         let data = arr.map(item => {
+            if (type == "property" && item.FirstTag == "RunParam") { //资产台账不显示运行参数
+                return undefined
+            }
             if (onlyRead) { //只读模式
+                if (!this.filterUnshow(onlyRead, type, item.InfoPointCode)) { //过滤固定不显示字段
+                    return undefined
+                }
                 if (showType == "Visible" && item.Visible) { //只看要采集的信息
-                    return tools.isUnit(item)
+                    return this.isUnit(item)
                 } else if (showType == "all") { //显示全部
-                    return tools.isUnit(item)
+                    return this.isUnit(item)
                 } else {
                     return undefined
                 }
             } else { //编辑模式
-                if (!showTools.filterUnshow(onlyRead, type, item.InfoPointCode)) { //过滤固定不显示字段
+                if (taizhang && !this.filterFirm(item.InfoPointCode)) {
+                    return undefined
+                }
+                if (!this.filterUnshow(onlyRead, type, item.InfoPointCode)) { //过滤固定不显示字段
                     return undefined
                 }
                 if (showType == "Visible" && item.Visible) { //只看要采集的信息
-                    return tools.isUnit(item)
+                    return this.isUnit(item)
                 } else if (showType == "all") { //显示全部
-                    return tools.isUnit(item)
-                } else if (showType == "partInfo" && showTools.isShow(item.InfoPointCode)) { //隐藏部分厂家信息(***需维护不显示列表***)
-                    if (item.FirstName == "控制参数" || item.FirstName == "设定参数" || item.FirstName == "运行参数") {
+                    return this.isUnit(item)
+                } else if (showType == "partInfo" && item.Visible && this.isShow(item.InfoPointCode)) { //隐藏部分厂家信息(***需维护不显示列表***)
+                    // if (item.FirstName == "控制参数" || item.FirstName == "设定参数" || item.FirstName == "运行参数") {
+                    if (item.FirstTag == "TechParam") { //技术参数
                         return undefined
                     } else {
-                        return tools.isUnit(item)
+                        return this.isUnit(item)
                     }
                 } else {
                     return undefined
@@ -911,50 +928,62 @@ const showTools = {
         }).filter(d => d)
         return data
     },
-    headerTypeFilter (arr, type, onlyRead, showType, taizhang = false) {
+    headerTypeFilter(arr, type, onlyRead, showType, taizhang = false) {
         if (taizhang && !onlyRead) {
-            arr = showTools.arrToArr(arr)
+            arr = this.arrToArr(arr, showType)
         }
         let data = arr.map(item => {
+            if (type == "property" && item.FirstTag == "RunParam") { //资产台账不显示运行参数
+                return undefined
+            }
             if (onlyRead) { //只读模式
+                if (!this.filterUnshow(onlyRead, type, item.InfoPointCode)) { //过滤固定不显示字段
+                    return undefined
+                }
                 if (showType == "Visible" && item.Visible) { //只看要采集的信息
-                    return tools.textFormat(item, onlyRead)
+                    return this.textFormat(item, onlyRead)
                 } else if (showType == "all") { //显示全部
-                    return tools.textFormat(item, onlyRead)
+                    return this.textFormat(item, onlyRead)
                 } else {
                     return undefined
                 }
             } else { //编辑模式
-                if (!showTools.filterUnshow(onlyRead, type, item.InfoPointCode)) { //过滤固定不显示字段
+                if (taizhang && !this.filterFirm(item.InfoPointCode)) {
+                    return undefined
+                }
+                if (!this.filterUnshow(onlyRead, type, item.InfoPointCode)) { //过滤固定不显示字段
                     return undefined
                 }
                 if (showType == "Visible" && item.Visible) { //只看要采集的信息
-                    return tools.inputModeFilter(item)
+                    return this.inputModeFilter(item, onlyRead)
                 } else if (showType == "all") { //显示全部
-                    return tools.inputModeFilter(item)
-                } else if (showType == "partInfo" && showTools.isShow(item.InfoPointCode)) { //隐藏部分厂家信息(***需维护不显示列表***)
-                    if (item.FirstName == "控制参数" || item.FirstName == "设定参数" || item.FirstName == "运行参数") {
+                    return this.inputModeFilter(item, onlyRead)
+                } else if (showType == "partInfo" && item.Visible && this.isShow(item.InfoPointCode)) { //隐藏部分厂家信息(***需维护不显示列表***)
+                    // if (item.FirstName == "控制参数" || item.FirstName == "设定参数" || item.FirstName == "运行参数") {
+                    if (item.FirstTag == "TechParam") { //技术参数
                         return undefined
                     } else {
-                        return tools.inputModeFilter(item)
+                        return this.inputModeFilter(item, onlyRead)
                     }
                 } else {
                     return undefined
                 }
-
             }
         }).filter(d => d)
         return data
     },
-    isUnit (item) {
+    isUnit(item) {
         if (!item.Unit || item.Unit == "") {
             return item.InfoPointName;
         } else {
             return item.InfoPointName + "(" + item.Unit + ")";
         }
     },
-    textFormat (item, onlyRead) {
-        if (item.InfoPointCode == "EquipQRCode") {
+    textFormat(item, onlyRead) {
+        if (
+            item.InfoPointCode == "EquipQRCode" ||
+            item.InfoPointCode == "RoomQRCode"
+        ) {
             return {
                 data: item.Path,
                 renderer: text.lookQRCode,
@@ -988,13 +1017,70 @@ const showTools = {
             }
         }
 
-        return {
-            data: item.Path,
-            readOnly: onlyRead
+        if (item.InputMode == "D1" || item.InputMode == "E1") { //单选输入
+            return {
+                data: item.Path,
+                renderer: tools.customDropdownRenderer,
+                editor: "chosen",
+                readOnly: onlyRead,
+                chosenOptions: {
+                    data: item.DataSource ? tools.formatDataSource(item.DataSource) : ""
+                }
+            };
+        } else if (item.InputMode == "D2" || item.InputMode == "E2") { //多选输入
+            return {
+                data: item.Path,
+                renderer: tools.customDropdownRenderer,
+                editor: "chosen",
+                readOnly: onlyRead,
+                chosenOptions: {
+                    multiple: true, //多选
+                    data: item.DataSource ? tools.formatDataSource(item.DataSource) : ""
+                }
+            };
+        } else if (item.InputMode == "A1" || item.InputMode == "A2") { //数字输入
+            return {
+                data: item.Path,
+                type: "numeric",
+                readOnly: onlyRead,
+                numericFormat: {
+                    pattern: "0,0.00"
+                }
+            };
+        } else if (item.InputMode == "C5") { //日期输入
+            return {
+                data: item.Path,
+                type: "date",
+                dateFormat: "YYYY-MM-DD",
+                readOnly: onlyRead,
+                correctFormat: true
+            };
+        } else if (item.InputMode == "A3" ||
+            item.InputMode == "A4" ||
+            item.InputMode == "B1" ||
+            item.InputMode == "B2" ||
+            item.InputMode == "F1" ||
+            item.InputMode == "F2" ||
+            item.InputMode == "L1" ||
+            item.InputMode == "L2" ||
+            item.InputMode == "L" ||
+            item.InputMode == "M") { //文本输入
+            return {
+                data: item.Path,
+                readOnly: onlyRead
+            }
+        } else { //(未支持的输入方式)暂不支持编辑
+            return {
+                data: item.Path,
+                readOnly: onlyRead
+            }
         }
     },
-    inputModeFilter (item) {
-        if (item.InfoPointCode == "EquipQRCode") {
+    inputModeFilter(item, onlyRead) {
+        if (
+            item.InfoPointCode == "EquipQRCode" ||
+            item.InfoPointCode == "RoomQRCode"
+        ) {
             return {
                 data: item.Path,
                 renderer: text.lookQRCode,
@@ -1028,6 +1114,20 @@ const showTools = {
             }
         }
 
+        //四大厂商
+        if (
+            item.InfoPointCode == "DPSupplierID" ||
+            item.InfoPointCode == "DPMaintainerID" ||
+            item.InfoPointCode == "DPInsurerID" ||
+            item.InfoPointCode == "DPManufacturerID"
+        ) {
+            return {
+                data: item.Path,
+                renderer: text.idType,
+                readOnly: !item.Editable
+            }
+        }
+
         if (item.InputMode == "D1" || item.InputMode == "E1") { //单选输入
             return {
                 data: item.Path,
@@ -1066,35 +1166,30 @@ const showTools = {
                 readOnly: !item.Editable,
                 correctFormat: true
             };
-        } else if ( item.InputMode == "A3" ||
-                    item.InputMode == "A4" ||
-                    item.InputMode == "B1" || 
-                    item.InputMode == "B2" ||
-                    item.InputMode == "F1" ||
-                    item.InputMode == "F2" ||
-                    item.InputMode == "L1" ||
-                    item.InputMode == "L2" ||
-                    item.InputMode == "L" ||
-                    item.InputMode == "M" ) { //文本输入
+        } else if (item.InputMode == "A3" ||
+            item.InputMode == "A4" ||
+            item.InputMode == "B1" ||
+            item.InputMode == "B2" ||
+            item.InputMode == "F1" ||
+            item.InputMode == "F2" ||
+            item.InputMode == "L1" ||
+            item.InputMode == "L2" ||
+            item.InputMode == "L" ||
+            item.InputMode == "M") { //文本输入
             return {
                 data: item.Path,
                 readOnly: !item.Editable
             }
-        } else if (item.InputMode == "Own") { //四大厂商
+        } else { //(未支持的输入方式)暂不支持编辑
             return {
                 data: item.Path,
-                renderer: text.idType,
-                readOnly: !item.Editable
-            }
-        } else { //不支持输入(暂定后台控制是否可编辑)
-            return {
-                data: item.Path,
-                readOnly: !item.Editable
+                readOnly: onlyRead
             }
         }
     },
     filterUnshow: (onlyRead, type, code) => {
-        let falg = true, data = fieldData[type]
+        let falg = true,
+			data = fieldData[type]
         if (onlyRead) {
             data.onlyRead.map(item => {
                 if (item == code) {
@@ -1103,14 +1198,23 @@ const showTools = {
             })
             return falg
         } else {
-            data.onlyRead.map(item => {
+            data.edit.map(item => {
                 if (item == code) {
                     falg = false
                 }
             })
             return falg
         }
+    },
+    filterFirm: (code) => {
+        let falg = true
+        firmArr.map(item => {
+            if (item == code) {
+                falg = false
+            }
+        })
+        return falg
     }
 }
 
-export default showTools
+export default showTools

+ 3 - 3
src/utils/point_edit/handson_header.js

@@ -204,21 +204,21 @@ let common = [{
         FirstTag: ""
     },
     {
-        InfoPointName: "设备类型关键字",
+        InfoPointName: "对象类型关键字",
         InfoPointCode: "KeyEquipmentType",
         InputMode: "B1",
         Visible: true,
         FirstTag: ""
     },
     {
-        InfoPointName: "设备参数关键字",
+        InfoPointName: "对象参数关键字",
         InfoPointCode: "KeyEquipmentParameter",
         InputMode: "B1",
         Visible: true,
         FirstTag: ""
     },
     {
-        InfoPointName: "设备标识",
+        InfoPointName: "对象标识",
         InfoPointCode: "EquipmentMark",
         InputMode: "B1",
         Visible: true,

+ 2 - 2
src/utils/point_edit/steps2.js

@@ -20,14 +20,14 @@ export default [{
         FirstTag: ""
     },
     {
-        InfoPointName: "设备类型关键字",
+        InfoPointName: "对象类型关键字",
         InfoPointCode: "KeyEquipmentType",
         InputMode: "B1",
         Visible: true,
         FirstTag: ""
     },
     {
-        InfoPointName: "设备参数关键字",
+        InfoPointName: "对象参数关键字",
         InfoPointCode: "KeyEquipmentParameter",
         InputMode: "B1",
         Visible: true,

+ 4 - 4
src/utils/point_edit/steps3.js

@@ -13,28 +13,28 @@ export default [{
         FirstTag: ""
     },
     {
-        InfoPointName: "设备类型关键字",
+        InfoPointName: "对象类型关键字",
         InfoPointCode: "KeyEquipmentType",
         InputMode: "B1",
         Visible: true,
         FirstTag: ""
     },
     {
-        InfoPointName: "设备参数关键字",
+        InfoPointName: "对象参数关键字",
         InfoPointCode: "KeyEquipmentParameter",
         InputMode: "B1",
         Visible: true,
         FirstTag: ""
     },
     {
-        InfoPointName: "设备标识",
+        InfoPointName: "对象标识",
         InfoPointCode: "EquipmentMark",
         InputMode: "B1",
         Visible: true,
         FirstTag: ""
     },
     {
-        InfoPointName: "数据字典设备类&信息点",
+        InfoPointName: "数据字典对象类&信息点",
         InfoPointCode: "PhysicalRelated",
         InputMode: "B1",
         Visible: true,

+ 23 - 9
src/utils/scan/tools.js

@@ -309,6 +309,16 @@ tools.hasRelation = function(instance, td, row, col, prop, value, cellProperties
     return td;
 }
 
+//关联的资产
+tools.LinkEquipLocalName = function(instance, td, row, col, prop, value, cellProperties) {
+    if (value) {
+        td.innerHTML = value;
+    } else {
+        td.innerHTML = instance.getDataAtRowProp(row,'LinkEquipName');
+    }
+    return td;
+}
+
 tools.num = function(instance, td, row, col, prop, value, cellProperties) {
     td.style.color = "#409EFF";
     td.style.cursor = "pointer";
@@ -447,23 +457,27 @@ tools.dateAddYear = function(date, yearCount) {
     return result;
 }
 
-tools.formatDataSource = function (data) {
+tools.formatDataSource = function(data) {
     let options
     let arr = []
+    function recursion (data) {
+        let arr = []
+        data.map((item) =>{
+            if (item.Code && item.Name)
+            arr.push({ Code: item.Code, Name: item.Name })
+            if (item.Content && item.Content.length)
+            arr = arr.concat(recursion(item.Content))
+        })
+        return arr
+    }
     try{
         options = JSON.parse(data)
         if(options) {
-            options.forEach((item) =>{
-                arr.push({
-                    Code: item.code,
-                    Name: item.name
-                }) 
-            })
-            return arr
+            return recursion(options)
         } else {
             return arr
         }
-    }catch(err){
+    } catch (err) {
         return arr
     }
 }

+ 0 - 512
src/views/business_space/business_list/index.vue

@@ -1,512 +0,0 @@
-<!--
-  revit业务空间
- -->
-<template>
-    <div id="businessSpace">
-        <!------------------------    头部弹窗,选择楼层信息     -------------->
-        <!-- <no-model-dialog :param="param" title="选择要进行空间管理的楼层" :isShow="floor" @close="close"></no-model-dialog> -->
-        <influence-dialog ref="influence" :param="param" :tabsList="tabsList" title="受元空间变化影响的业务空间" :isShow="floor"></influence-dialog>
-        <details-dialog ref="details" @del="delSuccess" :param="param" :tabsList="tabsList" title="业务空间详情" :isShow="floor" :activeTabType="activeTabType"></details-dialog>
-        <not-related ref="notRelated" @createSuccess="createSuccess" :isShow="floor"></not-related>
-        <facility-dialog ref="facility" :activeTabType="activeTabType" :isShow="floor"></facility-dialog>
-        <!--------- 页面头部   -------------->
-        <div class="saga-title">
-            <!-- <div class="saga-build-mess">
-                <p>
-                    <i class="iconfont icon-jianzhu"></i> {{buildMess.buildName}} - {{buildMess.name}}
-                </p>
-                <el-button class="saga-btn" type="text" @click="changeShow">切换楼层</el-button>
-            </div> -->
-            <div class="saga-build-mess">
-                    <span style="padding-right:12px">建筑楼层</span>
-                    <el-cascader
-                        :options="options"
-                        v-model="buildMess.selectd"
-                        :props="props"
-                        @change="close">
-                    </el-cascader>
-                </div>
-            <div class="saga-build-tab">
-                <!-- <div class="tab-main" @click="tabList(1)" :class="isMyTab == 1 ? 'tab-active' : ''">
-                    <i class="iconfont icon-tupian"></i>
-                    <span>平面图</span>
-                </div>
-                <div class="tab-main" @click="tabList(2)" :class="isMyTab == 2 ? 'tab-active' : ''">
-                    <i class="iconfont icon-liebiao"></i>
-                    <span>列表</span>
-                </div> -->
-                <el-radio-group v-model="isMyTab" @change="changeRadio" style="width: 136px;">
-                    <el-radio-button label="1">平面图</el-radio-button>
-                    <el-radio-button label="2" class="space-own-radio" style="width: 68px;">列表</el-radio-button>
-                </el-radio-group>
-            </div>
-        </div>
-        <div v-show="isMyTab == 1" class="saga-business-sapce-main">
-            <el-tabs v-model="activeName" @tab-click="tab1Click">
-                <template v-for="(item,index) in tabsList">
-                    <el-tab-pane :name="item.code" :key="index" :disabled="item.code > 3">
-                    <span slot="label">{{item.name}}</span>
-                    <graphy
-                        @getSp="checkSpace"
-                        @dimension="checkSpace"
-                        @businessDetails="getBuinessDetails"
-                        :ref="'graphy' + item.code"
-                        :canvasId="item.code"
-                    ></graphy>
-                    </el-tab-pane>
-                </template>
-            </el-tabs>
-            <!-- <space-graphy @dimension="checkSpace" :tabsList="tabsList" ref="graphy" :param="param"></space-graphy> -->
-            </div>
-            <div v-show="isMyTab == 2" class="saga-business-sapce-main">
-            <el-tabs v-model="activeName" @tab-click="handleClick">
-                <template v-for="(item,index) in tabsList">
-                    <el-tab-pane :name="item.code" :key="index" :disabled="item.code > 3">
-                        <span slot="label">{{item.name}}</span>
-                        <handsontable-main @lookEqu="lookEqu" :ref="'handsontable' + item.code" :id="'handsontable' + item.code" :param="param"></handsontable-main>
-                    </el-tab-pane>
-                </template>
-            </el-tabs>
-      <!-- <space-handsontable :tabsList="tabsList" ref="spaceTable" :param="param"></space-handsontable> -->
-    </div>
-  </div>
-</template>
-
-<script>
-    import noModelDialog from "@/components/business_space/dialogs/noModelDialog";
-    import influenceDialog from "@/components/business_space/dialogs/influenceDialog";
-    import detailsDialog from "@/components/business_space/dialogs/detailsDialog";
-    import notRelated from "@/components/business_space/dialogs/notRelated";
-    import facilityDialog from "@/components/business_space/dialogs/facilityDialog";
-    // import spaceHandsontable from "@/components/business_space/business/spaceHandsontable";
-    import graphy from "@/components/business_space/graphy/business";
-    import handsontableMain from "@/components/business_space/business/handsontable";
-    import {
-        getTableHeader,
-        getAllbusiness,
-        getBussTypes,
-        getSpaceFloor
-    } from "@/api/scan/request";
-    import tools from '@/utils/scan/tools'
-    import {
-        mapGetters,
-        mapActions
-    } from "vuex";
-    export default {
-        components: {
-            noModelDialog,
-            // spaceHandsontable,
-            influenceDialog,
-            detailsDialog,
-            notRelated,
-            graphy,
-            handsontableMain,
-            facilityDialog
-        },
-        computed: {
-            ...mapGetters('layout', ['projectId', 'userId', 'secret'])
-        },
-        data() {
-            return {
-                floor: {
-                    // dialogVisible: true, //选择楼层弹窗
-                    influence: false, //受影响的业务空间弹窗
-                    details: false, //详情弹窗
-                    notRelated: false,
-                    facility: false
-                },
-                param: {
-                    ProjId: this.projectId, //项目id
-                    UserId: this.userId, //用户id
-                    secret: this.secret
-                },
-                buildMess: {
-                    name: "--",
-                    code: "",
-                    selectd: [],
-                    map: "",
-                    isChild: true,
-                    buildName: "--",
-                    buildCode: ""
-                },
-                isMyTab: 1,
-                activeName: "GeneralZone",
-                tabsList: [],
-                activeTabType: {
-                    "code": "GeneralZone",
-                    "name": "默认分区",
-                    "rel_type": "99"
-                },
-                options: [],
-                props:{
-                    value: "code",
-                    label: "name",
-                    children: "children"
-                }
-            };
-        },
-        created() {
-            this.changeData()
-        },
-        mounted() {},
-        methods: {
-            changeData(){
-                this.param.ProjId = this.projectId
-                this.param.UserId = this.userId
-                this.param.secret = this.secret
-                this.getFloor()
-                this.getTypes()
-            },
-            changeRadio(){
-                if(!this.buildMess.selectd.length){
-                    this.$message("请选择楼层")
-                    return false
-                }
-                this.tabClick(this.isMyTab)
-            },
-            //获取楼层
-            getFloor() {
-                let param = {
-                    ProjId: this.projectId,
-                    UserId: this.UserId,
-                    secret: this.secret
-                };
-                getSpaceFloor(param).then(res => {
-                    console.log(res, 'res')
-                    if (res.data.Result == 'success') {
-                        let data = this.changeArr(res.data.Content).map(item => {
-                            if (item.children && item.children.length) {
-                                item.children = tools.sortArr(item.children, "shunxu", false)
-                            }
-                            return item
-                        })
-                        console.log(data, 'res.data')
-                        this.options = data
-                    } else {
-                        this.$message.error(res.data.ResultMsg)
-                    }
-                }).catch(() => {
-                    this.$message.error("请求出错")
-                })
-            },
-
-            //修改已有数组
-            changeArr(arr) {
-                return arr.map(item => {
-                    console.log(item.floors)
-                    if (item.floors && item.floors.length) {
-                        return {
-                            code: item.id,
-                            name: item.infos.BuildLocalName,
-                            children: item.floors.map(i => {
-                                return {
-                                    code: i.id,
-                                    name: (i.infos.FloorLocalName || i.infos.FloorName || "未知") + this.myMess(i),
-                                    map: i.infos.FloorMap || null,
-                                    affected: i.affected,
-                                    isChilren: 2,
-                                    buildCode: item.id,
-                                    buildName: item.infos.BuildLocalName,
-                                    shunxu: i.infos.FloorSequenceID || 0
-                                }
-                            })
-                        }
-                    } else {
-                        return {
-                            code: item.id,
-                            name: item.infos.BuildLocalName,
-                            children: null,
-                            isChilren: 1,
-                        }
-                    }
-                })
-            },
-            myMess(i) {
-                if (i.affected) {
-                    return "(该业务空间受元空间变化影响)"
-                } else {
-                    if (i.infos.FloorMap) {
-                        return ''
-                    } else {
-                        return "(请初始化平面图)"
-                    }
-                }
-            },
-            //获取tabs的列表
-            getTypes() {
-                getBussTypes(res => {
-                    let arr = [{
-                            "code": "GeneralZone",
-                            "name": "默认分区",
-                            "rel_type": "99"
-                        },
-                        {
-                            "name": "供电分区",
-                            "rel_type": "1",
-                            "code": "PowerSupplyZone"
-                        },
-                        {
-                            "name": "照明分区",
-                            "rel_type": "2",
-                            "code": "LightingZone"
-                        },
-                        {
-                            "name": "空调分区",
-                            "rel_type": "4",
-                            "code": "AirConditioningZone"
-                        },{
-                            "name":'租赁分区',
-                            'rel_type':'10',
-                            "code":'TenantZone'
-                        }
-                    ]
-                    this.tabsList = arr
-                    // console.log(res)
-                    // this.tabsList = res.Content
-                })
-            },
-            checkSpace(list, build, graphyId) {
-                this.floor.notRelated = true;
-                this.$refs.notRelated.getIdList(list, build, graphyId, this.activeTabType);
-                this.$refs["graphy" + this.activeName][0].getHasSpace();
-            },
-            changeShow() {
-                this.floor.dialogVisible = true;
-                console.log(this.buildMess, 'buildMess')
-            },
-            //成功关联平面图
-            createSuccess() {
-                this.$refs["graphy" + this.activeName][0].getHasSpace();
-                this.$refs["graphy" + this.activeName][0].clearDimension();
-                this.floor.notRelated = false;
-            },
-            //成功删除业务空间
-            delSuccess() {
-                this.floor.details = false;
-                this.$refs["graphy" + this.activeName][0].getHasSpace();
-                this.$refs["graphy" + this.activeName][0].clearDimension();
-            },
-            close() {
-                this.buildMess = this.changeBuildMess(this.buildMess,this.options)
-                console.log(this.buildMess,'this.buildMess')
-                if (this.buildMess.affected) {
-                    this.floor.influence = true;
-                    this.$nextTick(() => {
-                        this.$refs.influence.getData(this.buildMess);
-                    });
-                }
-                if (!this.buildMess.map) {
-                    this.isMyTab = 2;
-                }
-                if (this.isMyTab == 2) {
-                    this.initTabs(this.buildMess);
-                } else {
-                    let data = this.getItemForType()
-                    this.$refs["graphy" + this.activeName][0].getData(this.buildMess.map, this.buildMess, this.activeTabType);
-                }
-            },
-
-            //通过code查询options中的其他参数
-            changeBuildMess(mess,options){
-                options.map(item => {
-                    if(!!item.children && item.children.length){
-                        item.children.map(child => {
-                            if(child.code == mess.selectd[1]){
-                                console.log(child,mess)
-                                mess = Object.assign(mess,child)
-                            }
-                        })
-                    }
-                })
-                return mess
-            },
-            //查看业务空间详情
-            getBuinessDetails(list) {
-                this.floor.details = true;
-                this.$refs.details.getData(list, this.buildMess);
-            },
-            lookEqu(infos) {
-                this.floor.facility = true;
-                this.$refs.facility.getData(infos, this.buildMess);
-            },
-            tabClick(num) {
-                console.log(this.$refs)
-                this.isMyTab = num;
-                if (num == 2) {
-                    this.initTabs(this.buildMess);
-                } else {
-                    let data = this.getItemForType()
-                    this.$refs["graphy" + this.activeName][0].getData(this.buildMess.map, this.buildMess, this.activeTabType);
-                }
-            },
-            //获取初始化信息点
-            initMessage() {
-                getTableHeader({
-                    code: this.activeTabType.code,
-                    ProjId: this.param.ProjId
-                }).then(res => {
-                    console.log(res)
-                    if (res.data.Result == "success") {
-                        console.log(res);
-                        let refFlag = "handsontable" + this.activeName;
-                        this.$refs[refFlag][0].getHeader(res.data.Content, this.activeTabType);
-                        //   for (let i = 0; i < this.tabsList.length; i++) {
-                        //   }
-                        this.getTableMain();
-                    } else {
-                        this.$message.error("请求错误");
-                    }
-                });
-            },
-            getItemForType() {
-                let data = {}
-                this.tabsList.map(item => {
-                    if (item.code == this.activeName) {
-                        data = item
-                    }
-                })
-                return data
-            },
-            tab1Click() {
-                this.activeTabType = this.getItemForType()
-                this.$refs["graphy" + this.activeName][0].getData(this.buildMess.map, this.buildMess, this.activeTabType);
-            },
-            /**
-             * tab标签被点击触发后的函数
-             * @param tab   tab实例
-             * @param event tab的dom
-             *
-             */
-            handleClick(tab, event) {
-                this.activeTabType = this.getItemForType()
-                this.initMessage();
-            },
-            /**
-             * 选择楼层后初始化tabs
-             * 由父级页面调用
-             *
-             * @param  floorParam  父级传入的楼层信息
-             */
-            initTabs(floorParam) {
-                // this.floor = floorParam;
-                this.initMessage();
-            },
-            getTableMain() {
-                let refFlag = "handsontable" + this.activeName;
-                this.$nextTick(() => {
-                    this.$refs[refFlag][0].getData(this.buildMess);
-                });
-                //   for (let i = 0; i < this.tabsList.length; i++) {
-                //     if (i == 0) {
-                //     }
-                //   }
-            }
-        },
-        watch: {
-            floor: {
-                deep: true,
-                handler: function() {
-                    if (this.floor.notRelated) {
-                        this.$refs["graphy" + this.activeName][0].clearDimension();
-                    }
-                }
-            },
-            projectId(){
-                this.changeData()
-            }
-        }
-    };
-</script>
-
-<style lang="less">
-    #businessSpace {
-        position: relative;
-        display: flex;
-        flex-direction: column;
-        .space-own-radio{
-            .el-radio-button__inner{
-                padding: 9px 21px;
-            }
-        }
-        .el-dialog__body {
-            max-height: 600px;
-            overflow-y: auto;
-        }
-        .saga-title {
-            height: 54px;
-            background-color: #fff;
-            font-size: 14px;
-            position: relative;
-            line-height: 54px;
-            width: 99.5%;
-            margin-bottom:10px;
-            border: 1px solid #dfe6ec;
-            .saga-build-mess {
-                position: absolute;
-                left: 10px;
-                width: 500px;
-                i {
-                    padding-right: 5px;
-                }
-                p {
-                    float: left;
-                }
-                .saga-btn {
-                    float: left;
-                    height: 40px;
-                    line-height: 40px;
-                    padding: 0 10px;
-                }
-            }
-            .saga-build-tab {
-                position: absolute;
-                left: 50%;
-                transform: translateX(-50%);
-                .tab-main {
-                    float: left;
-                    width: 120px;
-                    padding: 0 5px;
-                    margin: 5px 0;
-                    border: 1px solid #ccc;
-                    background-color: #fff;
-                    height: 30px;
-                    box-sizing: border-box;
-                    text-align: center;
-                    cursor: pointer;
-                    overflow: hidden;
-                    i {
-                        font-size: 18px;
-                        padding-right: 10px;
-                        float: left;
-                        line-height: 30px;
-                        margin-left: 10px;
-                    }
-                    span {
-                        line-height: 30px;
-                        float: left;
-                    }
-                }
-                .tab-active {
-                    background-color: #409eff;
-                    color: #fff;
-                }
-            }
-        }
-        .saga-business-sapce-main {
-            flex: 1;
-            top: 40px;
-            left: 0;
-            right: 0;
-            bottom: 0;
-            overflow: hidden;
-            overflow-y: auto;
-            background: #fff;
-            .el-tabs__nav{
-                padding-left: 10px;
-            }
-            .el-tabs__active-bar{
-                padding-left: 24px;
-            }
-        }
-    }
-</style>

+ 14 - 3
src/views/dasboard/index.vue

@@ -6,8 +6,10 @@
         <div class="main-text">
             <div class="main-content">
                 <h1>功能设计中。。。</h1>
-                <p><b>功能设计说明:</b><slot name="explain"></slot></p>
-                <p><b>计划可查看时间:</b><slot name="time"></slot></p>
+                <p class="time"><b>计划完成:</b><slot name="plan"></slot><b>开发完成:</b><slot name="finish"></slot></p>
+                <p><b>上线时间:</b><slot name="onLine"></slot></p>
+                <p class="explain">业务功能说明:</p>
+                <div><slot name="explain"></slot></div>
             </div>
         </div>
     </div>
@@ -52,8 +54,17 @@ export default {
         position: absolute;
         padding-right: 200px;
         top: 20%;
+        .time{
+            margin-top: 10px;
+        }
+        .explain{
+            margin-top: 20px;
+        }
         p{
-            padding: 20px 0;
+            font-weight: bold;
+            span{
+                margin-right: 20px;
+            }
         }
     }
 }

+ 0 - 2
src/views/data_admin/buildData/index.vue

@@ -1174,7 +1174,6 @@
                 let isSort = this.myHotArr[this.tabChecked]
                     .getPlugin("columnSorting")
                     .isSorted();
-                // debugger
                 if (trimmedArr.length && isSort) {
                     let sortArr = this.myHotArr[this.tabChecked].getPlugin("columnSorting")
                         .rowsMapper.__arrayMap;
@@ -1604,7 +1603,6 @@
             },
             afterDocumentKeyDown(e) {
                 //   this.$nextTick(() => {
-                console.log(e, e.realTarget.value)
                 let activeEditer = this.myHotArr[this.tabChecked].getActiveEditor(), td, row, prop, 
                     val = e.realTarget.value,
                     infoArr = ["Brand", "Specification", "Manufacturer", "Supplier", "Maintainer", "Insurer", "SupplierContactor", "SupplierPhone", "SupplierEmail", "SupplierWeb", "SupplierFax", "MaintainerContactor", "MaintainerPhone", "MaintainerEmail", "MaintainerWeb", "MaintainerFax", "InsurerContactor", "InsurerPhone", "InsurerEmail", "InsurerWeb", "InsurerFax"];

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

@@ -1,7 +1,7 @@
 <template>
     <div ref="graphyMain" class="canvasGraphy">
         <div v-if="type != 3" class="center" style="height: 400px;padding-top: 315px; box-sizing:border-box;">
-            <i class="iconwushuju iconfont"></i>
+            <i class="icon-wushuju iconfont"></i>
             <p>{{type == 1 ? '请选择楼层' : '当前楼层尚无平面图,请去空间管理根据模型生成'}}</p>
         </div>
         <div style="width:100%;" v-else>

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

@@ -16,7 +16,7 @@ getLocation 定位
                     </div>
                 </div>
                 <div v-if="!pointData.length" class="center" style="height: 400px;padding-top: 260px; box-sizing:border-box;">
-                    <i class="iconwushuju iconfont"></i>
+                    <i class="icon-wushuju iconfont"></i>
                     {{pointParam.FloorId ? "数据为空" : "请选择楼层"}}
                 </div>
       </el-tab-pane>
@@ -34,7 +34,7 @@ getLocation 定位
             </div>
             </div>
             <div v-if="!pointNoData.length" class="center" style="height: 400px;padding-top: 260px; box-sizing:border-box;">
-                <i class="iconwushuju iconfont"></i>
+                <i class="icon-wushuju iconfont"></i>
                 {{pointParam.FloorId ? "数据为空" : "请选择楼层"}}
             </div>
         </el-tab-pane>

+ 3 - 3
src/views/data_admin/buildGraphy/lib/uploadImgsName.vue

@@ -193,7 +193,7 @@ export default {
                 if (vm.type == 'image') {
                   vm.imagesArr.push(
                     {
-                      name: uploadKey,
+                      name: uploadKey + '',
                       key: uploadKey + "." + type,
                       systemId: "dataPlatform",
                       type: "image"
@@ -202,7 +202,7 @@ export default {
                 }
                 if (type == 'mp4') {
                   vm.imagesArr.push({
-                    name: uploadKey,
+                    name: uploadKey + '',
                     key: uploadKey + "." + type,
                     systemId: "dataPlatform",
                     type: "video"
@@ -212,7 +212,7 @@ export default {
                 }
                 if (vm.type == "video" && type == "png") {
                   vm.videoPicArr.push({
-                    name: uploadKey,
+                    name: uploadKey + '',
                     key: uploadKey + "." + type,
                     systemId: "dataPlatform",
                     type: "image_video"

+ 223 - 226
src/views/data_admin/buildLog/index.vue

@@ -1,253 +1,250 @@
 <template>
-    <div style="display: flex; flex-direction: column;flex-grow: 1; flex-shrink: 1;">
-        <table-page-template>
-            <div slot='form' class='condition'>
-                <el-input
-                    v-model.trim='searchValue'
-                    class='margin-right'
-                    style='width: 300px;'
-                    placeholder='请输入操作人、动作、对象id等关键字搜索'
-                    @change='searchChange'
-                ></el-input>
-                <el-date-picker
-                    class='margin-right'
-                    v-model='dateValue'
-                    type='daterange'
-                    align='center'
-                    :clearable='false'
-                    unlink-panels
-                    range-separator='至'
-                    start-placeholder='开始日期'
-                    end-placeholder='结束日期'
-                    :picker-options='pickerOptions'
-                    @change='dateChange'
-                    value-format='yyyy-MM-dd'
-                ></el-date-picker>
-                
-            </div>
-            <div slot='table' style="border: 1px solid #dfe6ec">
-                <p style="text-align: right; padding: 10px">
-                    <el-button style="width: 96px" @click='action'>动作说明</el-button>
-                    <el-button style="width: 96px" @click='refresh'>刷新</el-button>
-                    <el-button style="width: 96px" @click='downExcel'>导出到Excel</el-button>
-                </p>
-                <el-table                
-                :data='tableData'
-                border
-                tooltip-effect='dark'
-                style='width: 100%;'
-                v-loading='loading'
-                height="710px"
-            >
-                <el-table-column prop='CreateTime' label='时间' width='150' align='center' header-align='center'></el-table-column>
-                <el-table-column prop='Comming' label='来源' width='120' header-align='center' align="center"></el-table-column>
-                <el-table-column prop='UserName' label='操作人' width='120' header-align='center' align='center'></el-table-column>
-                <el-table-column prop='Phone' label='手机' width='150' header-align='center' align='center'></el-table-column>
-                <el-table-column prop='Action' label='动作' header-align='center'></el-table-column>
-                <el-table-column prop='UserId' label='对象id' header-align='center' align='center'></el-table-column>
-                <el-table-column label='操作说明' width='350' header-align='center'>
-                    <template slot-scope='scope'>
-                        <div class='ellipsis btn' :title='scope.row.Note'>{{scope.row.Note}}</div>
-                    </template>
-                </el-table-column>
-            </el-table>
-            </div>
-            
-            <base-pagination :currentPages='pageNum' :total='total' @pageChanged='pageChanged' slot='pagination'></base-pagination>
-        </table-page-template>
-        <saga-action ref='action'></saga-action>
+  <div style="display: flex; flex-direction: column;flex-grow: 1; flex-shrink: 1;">
+    <div class="log-main">
+      <div class='condition'>
+        <el-input v-model.trim='searchValue' class='margin-right' style='width: 300px;'
+          placeholder='请输入操作人、动作、对象id等关键字搜索' @change='searchChange'></el-input>
+        <el-date-picker class='margin-right' v-model='dateValue' type='daterange' align='center' :clearable='false'
+          unlink-panels range-separator='至' start-placeholder='开始日期' end-placeholder='结束日期'
+          :picker-options='pickerOptions' @change='dateChange' value-format='yyyy-MM-dd'></el-date-picker>
+      </div>
+      <div class="log-table">
+        <p style="text-align: right; padding: 10px">
+          <el-button style="width: 96px" @click='action'>动作说明</el-button>
+          <el-button style="width: 96px" @click='refresh'>刷新</el-button>
+          <el-button style="width: 96px" @click='downExcel'>导出到Excel</el-button>
+        </p>
+        <div style="height: calc(100% - 52px)">
+          <el-table :data='tableData' tooltip-effect='dark' style='width: 100%;' v-loading='loading' height="100%">
+            <el-table-column prop='CreateTime' label='时间' width='150' align='center' header-align='center'>
+            </el-table-column>
+            <el-table-column prop='Comming' label='来源' width='120' header-align='center' align="center"></el-table-column>
+            <el-table-column prop='UserName' label='操作人' width='120' header-align='center' align='center'>
+            </el-table-column>
+            <el-table-column prop='Phone' label='手机' width='150' header-align='center' align='center'></el-table-column>
+            <el-table-column prop='Action' label='动作' width='200' header-align='center' align='center'></el-table-column>
+            <el-table-column prop='UserId' label='对象id' width='300' header-align='center' align='center'></el-table-column>
+            <el-table-column label='操作说明' header-align='left' align="left">
+              <template slot-scope='scope'>
+                <div class='ellipsis' :title='scope.row.Note'>{{scope.row.Note}}</div>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+      <el-pagination class="right" 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>
+    <saga-action ref='action'></saga-action>
+  </div>
 </template>
 
 <script>
-import {
-    getBuildLog, //获取日志
-    dowmloadLog //下载日志
-} from '@/api/scan/request'
+import { getBuildLog, dowmloadLog } from '@/api/scan/request' //获取日志/下载日志
 import { mapGetters, mapActions } from 'vuex'
 import axios from 'axios'
 //component
 import SagaAction from './Action'
+
 var date = new Date()
 const nowDate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate()
 export default {
-    name: 'data-log',
-    data() {
-        return {
-            loading: false,
-            searchValue: '',
-            tableData: [],
-            dateValue: [nowDate, nowDate],
-            pickerOptions: {
-                shortcuts: [
-                    {
-                        text: '今天',
-                        onClick(picker) {
-                            const end = new Date()
-                            const start = new Date()
-                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 0)
-                            picker.$emit('pick', [start, end])
-                        }
-                    },
-                    {
-                        text: '昨天',
-                        onClick(picker) {
-                            const end = new Date()
-                            const start = new Date()
-                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 1)
-                            picker.$emit('pick', [start, end])
-                        }
-                    },
-                    {
-                        text: '最近三天',
-                        onClick(picker) {
-                            const end = new Date()
-                            const start = new Date()
-                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 3)
-                            picker.$emit('pick', [start, end])
-                        }
-                    },
-                    {
-                        text: '最近一周',
-                        onClick(picker) {
-                            const end = new Date()
-                            const start = new Date()
-                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
-                            picker.$emit('pick', [start, end])
-                        }
-                    },
-                    {
-                        text: '最近一个月',
-                        onClick(picker) {
-                            const end = new Date()
-                            const start = new Date()
-                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
-                            picker.$emit('pick', [start, end])
-                        }
-                    }
-                ]
-            },
-            pageNum: 1,
-            pageSize: 50,
-            total: 80
-        }
+  name: 'data-log',
+  data() {
+    return {
+      loading: false,
+      searchValue: '',
+      tableData: [],
+      dateValue: [nowDate, nowDate],
+      pickerOptions: {
+        shortcuts: [
+          {
+            text: '今天',
+            onClick(picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 0)
+              picker.$emit('pick', [start, end])
+            }
+          },
+          {
+            text: '昨天',
+            onClick(picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 1)
+              picker.$emit('pick', [start, end])
+            }
+          },
+          {
+            text: '最近三天',
+            onClick(picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 3)
+              picker.$emit('pick', [start, end])
+            }
+          },
+          {
+            text: '最近一周',
+            onClick(picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
+              picker.$emit('pick', [start, end])
+            }
+          },
+          {
+            text: '最近一个月',
+            onClick(picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
+              picker.$emit('pick', [start, end])
+            }
+          }
+        ]
+      },
+      page: {
+        pageSize: 50,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0
+      }
+    }
+  },
+  components: {
+    SagaAction
+  },
+  computed: {
+    ...mapGetters('layout', ['projectId', 'userId'])
+  },
+  methods: {
+    searchChange(value) {
+      this.page.pageNumber = 1
+      this.getLogData()
     },
-    components: {
-        SagaAction
+    refresh() {
+      this.getLogData()
     },
-    computed: {
-        ...mapGetters('layout', ['projectId', 'userId'])
+    action() {
+      this.$refs['action'].show()
     },
-    methods: {
-        searchChange(value) {
-            this.pageNum = 1
-            this.getLogData()
-        },
-        refresh() {
-            this.getLogData()
-        },
-        action() {
-            this.$refs['action'].show()
-        },
-        // 导出
-        downExcel() {
-            let param = {
-                startTime: this.dateValue[0] + ' 00:00:00',
-                endTime: this.dateValue[1] + ' 23:59:59',
-                filter: this.searchValue,
-                ProjId: this.projectId,
-                UserId: this.userId,
-                Comming: 'revit'
-            }
-            axios({
-                method: 'post',
-                url: '/ScanBuilding/service/user_log/export',
-                data: param,
-                responseType: 'blob'
-            })
-                .then(function(res) {
-                    var blob = new Blob([res.data], {
-                        type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
-                    })
-                    var fileName = res.headers['content-disposition']
-                    if (fileName) fileName = fileName.substring(fileName.indexOf('=') + 1)
-                    if ('download' in document.createElement('a')) {
-                        // 非IE下载
-                        const elink = document.createElement('a')
-                        elink.download = fileName
-                        elink.style.display = 'none'
-                        elink.href = URL.createObjectURL(blob)
-                        document.body.appendChild(elink)
-                        elink.click()
-                        URL.revokeObjectURL(elink.href) // 释放URL 对象
-                        document.body.removeChild(elink)
-                    } else {
-                        // IE10+下载
-                        navigator.msSaveBlob(blob, fileName)
-                    }
-                })
-                .catch(function(err) {
-                    console.dirxml(err)
-                })
-        },
-        pageChanged(page, size) {
-            this.pageNum = page
-            this.pageSize = size
-            this.getLogData()
-        },
-        dateChange(value) {
-            this.pageNum = 1
-            this.getLogData()
-        },
-        getLogData() {
-            this.loading = true
-            let param = {
-                startTime: this.dateValue[0] + ' 00:00:00',
-                endTime: this.dateValue[1] + ' 23:59:59',
-                filter: this.searchValue,
-                pageNum: this.pageNum,
-                pageSize: this.pageSize,
-                ProjId: this.projectId,
-                UserId: this.userId
-            }
-            getBuildLog(param).then(res => {
-                this.loading = false
-                this.total = res.data.Count
-                this.tableData = res.data.LogList
-            })
-        },
-        init() {
-            this.getLogData()
-        }
+    // 导出
+    downExcel() {
+      let param = {
+        startTime: this.dateValue[0] + ' 00:00:00',
+        endTime: this.dateValue[1] + ' 23:59:59',
+        filter: this.searchValue,
+        ProjId: this.projectId,
+        UserId: this.userId,
+        Comming: 'revit'
+      }
+      axios({
+        method: 'post',
+        url: '/ScanBuilding/service/user_log/export',
+        data: param,
+        responseType: 'blob'
+      })
+        .then(function (res) {
+          var blob = new Blob([res.data], {
+            type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
+          })
+          var fileName = res.headers['content-disposition']
+          if (fileName) fileName = fileName.substring(fileName.indexOf('=') + 1)
+          if ('download' in document.createElement('a')) {
+            // 非IE下载
+            const elink = document.createElement('a')
+            elink.download = fileName
+            elink.style.display = 'none'
+            elink.href = URL.createObjectURL(blob)
+            document.body.appendChild(elink)
+            elink.click()
+            URL.revokeObjectURL(elink.href) // 释放URL 对象
+            document.body.removeChild(elink)
+          } else {
+            // IE10+下载
+            navigator.msSaveBlob(blob, fileName)
+          }
+        })
+        .catch(function (err) {
+          console.dirxml(err)
+        })
     },
-    created() {
-        this.init()
+    //切换每页显示多少条数据
+    handleSizeChange(val) {
+      this.page.pageSize = val
+      this.getLogData()
     },
-    watch: {
-        projectId() {
-            this.searchValue = '';
-            this.getLogData();
-        }
+    //切换页数
+    handleCurrentChange(val) {
+      this.page.pageNumber = val
+      this.getLogData()
+    },
+    dateChange(value) {
+      this.page.pageNumber = 1
+      this.getLogData()
+    },
+    getLogData() {
+      this.loading = true
+      let param = {
+        startTime: this.dateValue[0] + ' 00:00:00',
+        endTime: this.dateValue[1] + ' 23:59:59',
+        filter: this.searchValue,
+        pageNum: this.page.pageNumber,
+        pageSize: this.page.pageSize,
+        ProjId: this.projectId,
+        UserId: this.userId
+      }
+      getBuildLog(param).then(res => {
+        this.loading = false
+        this.page.total = res.data.Count
+        this.tableData = res.data.LogList
+      })
+    },
+    init() {
+      this.getLogData()
     }
+  },
+  created() {
+    this.init()
+  },
+  watch: {
+    projectId() {
+      this.searchValue = '';
+      this.getLogData();
+    }
+  }
 }
 </script>
 
 <style lang='less' scoped>
-.margin-right {
-    margin-right: 10px;
-}
-.condition {
+.log-main{
+  height: 100%;
+  background: #fff;
+  .condition {
     margin: 10px;
     display: flex;
+    .margin-right {
+      margin-right: 10px;
+    }
+  }
+  .log-table{
+    border-top: 2px solid #dfe6ec;
+    height: calc(100% - 100px);
+    .ellipsis {
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+    }
+  }
 }
-.ellipsis {
-    width: 350px;
-    overflow: hidden;
-    text-overflow: ellipsis;
-    white-space: nowrap;
-}
-.btn {
-    height: 28px;
-    line-height: 28px;
+</style>
+<style lang="less">
+.el-table th {
+  background-color: #d9d9d9;
+  color: #000;
 }
 </style>

+ 36 - 0
src/views/data_admin/buildTask/index.vue

@@ -0,0 +1,36 @@
+<template>
+    <div>
+      <das-board>
+        <template v-slot:plan>
+          <span>{{plan?plan:"yyyy-mm-dd"}}</span>
+        </template>
+        <template v-slot:finish>
+          <span>{{finish?finish:"yyyy-mm-dd"}}</span>
+        </template>
+        <template v-slot:onLine>
+          <span>{{onLine?onLine:"yyyy-mm-dd"}}</span>
+        </template>
+        <template v-slot:explain>
+          <span>{{explain?explain:"yyyy-mm-dd"}}</span>
+        </template>
+      </das-board>
+    </div>
+</template>
+
+<script>
+import dasBoard from "@/views/dasboard/index";
+export default {
+    components: {
+      dasBoard
+    },
+    data() {
+        return {
+          plan: "2019-08-21",
+          finish: "2019-09-06",
+          onLine: "2019-09-30",
+          explain: "现场任务的创建和修改;v1.2:任务完成情况的查看"
+        }
+    },
+    mounted() {}
+}
+</script>

+ 25 - 21
src/views/ledger/cenotelist/cenoteadd/index.vue

@@ -10,7 +10,7 @@
     <div class="tableBox">
       <div class="center middle_sty" style="flex:2;" v-show="tableData && !tableData.length">
         <p>
-          <i class="iconwushuju iconfont"></i>
+          <i class="icon-wushuju iconfont"></i>
           暂无数据
         </p>
       </div>
@@ -31,7 +31,7 @@ import text from "@/utils/handsontable/mainText"
 import session from "@/framework/utils/storage"
 
 import handsonTable from "@/components/common/handsontable"
-import { getDataDictionary, getCenoteTableHeader, createCenoteTableData } from "@/api/scan/request"
+import { getDataDictionary, createCenoteTableData } from "@/api/scan/request"
 import { mapGetters, mapActions } from "vuex";
 export default {
   components: {
@@ -44,7 +44,7 @@ export default {
       isTableRightShow: false,
       relationids: "",
       onlyRead: false,
-      allMess: true,
+      showType: "all",
       tableHeader: [],
       tableData: session.get("cenoteAddData")? session.get("cenoteAddData").length? session.get("cenoteAddData"): [{}]: [{}],
       copyTableData: []
@@ -67,9 +67,12 @@ export default {
     // 获取表头数据(初始化表格)
     async getTableHeader() {
       let param = {
-        PageNumber: 1,
-        PageSize: 500,
-        Filters: `type='Shaft'`
+        data: {
+          Orders: "sort asc",
+          PageNumber: 1,
+          PageSize: 500,
+        },
+        type: 'Shaft'
       }
       await getDataDictionary(param, res => {
         this.tableHeader = res.Content
@@ -78,6 +81,8 @@ export default {
     },
     // 创建竖井数据
     async handleCreateTableData() {
+      let params = {}
+      let flag = 0;//1.存在未填写竖井本地名称的数据;2.存在未选择竖井功能的数据
       let newData = this.tableData.filter((item) => {
         let keys = Object.keys(item)
         keys.map((key) => { //将值为空字符串的属性删除
@@ -85,6 +90,11 @@ export default {
             delete item[key]
           }
         })
+        if (!item.ShaftLocalName) {
+          flag = 1
+        } else if (!item.hasOwnProperty('StructureInfo') ||  !item.StructureInfo.ShaftFuncType) {
+          flag = 2
+        }
         if(keys.length && Object.keys(item).length) {
           return item
         }
@@ -92,12 +102,14 @@ export default {
       if(!newData.length) {
         this.$message("创建信息为空,请录入信息后再创建!")
         return
+      } else if (flag == 1) {
+        this.$message("存在未填写竖井本地名称的数据,请填写信息后再创建!")
+        return
+      } else if (flag == 2) {
+        this.$message("存在未选择竖井功能的数据,请选择信息后再创建!")
+        return
       }
-      const params = {
-        ProjId: this.projectId,
-        secret: this.secret,
-        data: newData
-      }
+      params.Content = newData
       await createCenoteTableData(params, (res) => {
         this.$message.success("添加成功!")
         session.remove("cenoteAddData")
@@ -143,21 +155,13 @@ export default {
     },
     formatHeaderData(list) {//格式化表头显示的数据
       let arr = tools.copyArr(list)
-      arr.map((item) => {
-        item.Visible = true
-      })
-      let readArr = ["A1", "A2", "B1", "C5", "D1", "D2", "E1", "F1", "F2", "L", "L1", "L2", "M"]
-      let data = showTools.changeHeader(arr, readArr, this.onlyRead, false, this.allMess)
+      let data = showTools.headerTextFilter(arr, "shaft", this.onlyRead, this.showType)
       // data.unshift("关联的元空间");
       return data;
     },
     formatHeaderType(list) {//格式化表头头映射的数据
       let arr = tools.copyArr(list);
-      arr.map((item) => { //缺少信息点
-        item.Visible = true
-      })
-      let readArr = ["A1", "A2", "B1", "C5", "D1", "D2", "E1", "F1", "F2", "L", "L1", "L2", "M"]
-      let data = showTools.showHeaderTypes(arr, readArr, this.onlyRead, false, this.allMess)
+      let data = showTools.headerTypeFilter(arr, "shaft", this.onlyRead, this.showType)
       // data.unshift({
       //   data: "SpaceCount",
       //   readOnly: this.onlyRead

+ 115 - 69
src/views/ledger/cenotelist/index.vue

@@ -3,20 +3,14 @@
     <div class="search-header">
       <cenote-type @change="changeFloor"></cenote-type>
     </div>
-    <el-row class="right">
-      <span style="float:left;">当前筛选条件下共{{page.total || '--'}}竖井</span>
-      <el-select v-model="onlyRead" @change="getTableHeader" style="width:100px;margin-right:10px;vertical-align:bottom;">
-        <el-option
-          v-for="item in options"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value">
-        </el-option>
+    <el-row class="left">
+      <span style="float:right;">当前筛选条件下共{{page.total || '--'}}竖井</span>
+      <el-select v-model="onlyRead" @change="getTableHeader" 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;">
+        <el-option v-for="item in showTypes" :key="item.value" :label="item.label" :value="item.value"></el-option>
       </el-select>
-      <div v-show="onlyRead" style="width:200px;display:inline-block;text-align:left;color:gray;font-size:12px;">
-        <span>只看要采集的信息</span>
-        <el-checkbox v-model="allMess" @change="getTableHeader"></el-checkbox>
-      </div>
       <el-button @click="handleCreateTableData">添加竖井</el-button>
       <el-button @click="getTableHeader">刷新</el-button>
       <el-button v-show="!onlyRead" @click="undo">撤销</el-button>
@@ -24,7 +18,7 @@
     <div class="tableBox">
       <div class="center middle_sty" style="flex:2;" v-show="tableData && !tableData.length">
         <p>
-          <i class="iconwushuju iconfont"></i>
+          <i class="icon-wushuju iconfont"></i>
           暂无数据
         </p>
       </div>
@@ -71,7 +65,7 @@ import text from "@/utils/handsontable/mainText"
 
 import cenoteType from "@/components/ledger/lib/cenoteType";
 import handsonTable from "@/components/common/handsontable";
-import { getDataDictionary, getCenoteTableHeader, getCenoteTableData, updataCenoteTableData, deleteCenoteTableData, saveCenoteRelateSpace } from "@/api/scan/request"
+import { getDataDictionary, getCenoteTableData, updataCenoteTableData, deleteCenoteTableData, saveCenoteRelateSpace, BeatchQueryParam } from "@/api/scan/request"
 import { mapGetters, mapActions } from "vuex";
 export default {
   components: {
@@ -92,7 +86,8 @@ export default {
         label: '编辑模式'
       }],
       onlyRead: true,
-      allMess: true,
+      showType: "",
+      // allMess: true,
       tableHeader: [],
       page: {
         pageSize: 50,
@@ -110,23 +105,39 @@ export default {
         "projectId",
         "secret",
         "userId"
-    ])
+    ]),
+    showTypes () {
+      return this.onlyRead?
+        [{value: "Visible", label: '只看采集信息'}, {value: "all", label: '全部'}]: 
+        [{value: "partInfo", label: '隐藏信息点'}, {value: "Visible", label: '只看采集信息'}, {value: "all", label: '全部'}]
+    }
   },
   created() {
     this.getTableHeader()
   },
-  // watch: {
-  //     projectId() {
-  //         this.param.ProjId = this.projectId;
-  //     }
-  // },
+  watch: {
+    showTypes: {
+      handler(newName, oldName) {
+        if (newName && newName[0] && newName[0].value) {
+          this.showType = newName[0].value
+        } else {
+          this.showType = ""
+        }
+      },
+      immediate: true,
+      deep: true
+    }
+  },
   methods: {
     // 获取表头数据(初始化表格)
     async getTableHeader() {
       let param = {
-        PageNumber: 1,
-        PageSize: 500,
-        Filters: `type='Shaft'`
+        data: {
+          Orders: "sort asc",
+          PageNumber: 1,
+          PageSize: 500
+        },
+        type: 'Shaft'
       }
       await getDataDictionary(param, res => {
         this.tableHeader = res.Content;
@@ -134,22 +145,21 @@ export default {
       })
     },
     async getTableData() {//获取表格数据
-      let data = {
+      let params = {
         Filters: this.cenoteId? `ProjectId='${this.projectId}';structureInfo.ShaftFuncType='${this.cenoteId}'`: `ProjectId='${this.projectId}'`,
+        Orders: "createTime desc, ShaftID asc",
         PageNumber: this.page.pageNumber,
         PageSize: this.page.pageSize
       }
-      const params = {
-        ProjId: this.projectId,
-        secret: this.secret,
-        data: data
-      }
       await getCenoteTableData(params, (res) => {
         this.tableData = res.Content
         this.copyTableData = tools.deepCopy(res.Content)
         this.page.pageNumber = res.PageNumber
         this.page.total = res.Total
         if(this.tableData && this.tableData.length){
+          if (this.onlyRead) {
+            this.getBatch(res.Content)
+          }
           this.initTable()
         }
       })
@@ -157,32 +167,28 @@ export default {
     // 修改表格内容
     async updateTableData(data, change) {
       let param = {
-        ProjId: this.projectId,
-        secret: this.secret,
-        data: {
-          Content: [],
-          Projection: []
-        }
+        Content: [],
+        Projection: []
       };
       //生成要修改字段列表
       change.map((item) => {
-        if(item[1] && param.data.Projection.indexOf(item[1]) == -1) {
-          param.data.Projection.push(item[1])
+        if(item[1] && param.Projection.indexOf(item[1]) == -1) {
+          param.Projection.push(item[1])
         }
       })
       //生成对应修改数据
       data.map((item, index) => {
-        // param.data.Projection.map(value => {
-        //   let itemData = tools.dataForKey(item, value)
-        //   tools.setDataForKey(item, value, itemData == "" ? null : itemData)
-        // })
+        param.Projection.map(value => {
+          let itemData = tools.dataForKey(item, value)
+          tools.setDataForKey(item, value, itemData == "" ? null : itemData)
+        })
         // let keyarr = change[index][1].split(".")
         // if (keyarr && keyarr.length > 1) {
         //   item[keyarr[0]][keyarr[1]] = item[keyarr[0]][keyarr[1]] != ""? item[keyarr[0]][keyarr[1]]: null
         // } else {
         //   item[keyarr[0]] = item[keyarr[0]] != ""? item[keyarr[0]]: null
         // }
-        param.data.Content.push(item);
+        param.Content.push(item);
       })
 
       await updataCenoteTableData(param, (res) => {
@@ -198,15 +204,10 @@ export default {
     },
     //保存元空间关联
     async saveSpaceList() {
-      let data = {
+      let params = {
         ShaftId: this.shaftId,
         SpaceId: this.spaceList
       }
-      const params = {
-        ProjId: this.projectId,
-        secret: this.secret,
-        data: data
-      }
       await saveCenoteRelateSpace(params, (res) => {
         this.$message.success("关联成功!")
         this.getTableHeader()
@@ -222,13 +223,9 @@ export default {
       if (params.length < 1 || this.tableData > this.copyTableData) {
         return
       }
-      let param = {
-        ProjId: this.projectId,
-        secret: this.secret,
-        data: []
-      }
+      let param = []
       params.map(item => {
-        param.data.push(item.ShaftID)
+        param.push({ShaftID: item.ShaftID})
       })
       this.$confirm("此操作将删除竖井,是否继续?", "提示", {
         confirmButtonText: '确定',
@@ -289,21 +286,13 @@ export default {
     },
     formatHeaderData(list) {//格式化表头显示的数据
       let arr = tools.copyArr(list)
-      arr.map((item) => {
-        item.Visible = true
-      })
-      let readArr = ["A1", "A2", "B1", "C5", "D1", "D2", "E1", "F1", "F2", "L", "L1", "L2", "M"]
-      let data = showTools.changeHeader(arr, readArr, this.onlyRead, false, this.allMess)
+      let data = showTools.headerTextFilter(arr, "shaft", this.onlyRead, this.showType)
       data.unshift("关联的元空间");
       return data;
     },
     formatHeaderType(list) {//格式化表头头映射的数据
       let arr = tools.copyArr(list);
-      arr.map((item) => { //缺少信息点
-        item.Visible = true
-      })
-      let readArr = ["A1", "A2", "B1", "C5", "D1", "D2", "E1", "F1", "F2", "L", "L1", "L2", "M"]
-      let data = showTools.showHeaderTypes(arr, readArr, this.onlyRead, false, this.allMess)
+      let data = showTools.headerTypeFilter(arr, "shaft", this.onlyRead, this.showType)
       data.unshift({
         data: "SpaceCount",
         renderer: tools.num,
@@ -327,13 +316,13 @@ export default {
         },
         // 事件
         afterChange: this.handleUpdataTable, //修改后
-        // afterFilter: this.trimmedRows, //排序前
+        afterFilter: this.trimmedRows, //排序前
         afterRemoveRow: this.handleDeleteTableRow, //右键删除
         afterOnCellMouseDown: this.handleTdClick //鼠标点击
       };
       this.$nextTick(() => {
-        console.log(this.$refs.table);
-        this.tableExample = this.$refs.table.init(settings);
+        console.log(this.$refs.table)
+        this.tableExample = this.$refs.table.init(settings)
       });
     },
     //获取到了正确的信息
@@ -408,6 +397,63 @@ export default {
         }
       }
       return a;
+    },
+    //获取动态参数
+    getBatch(data) {
+      let param = {
+        secret: this.secret,
+        ProjId: this.projectId,
+        data: {
+          criterias: []
+        }
+      };
+      this.tableHeader.map(head => {
+        if (
+          head.InputMode == "L" ||
+          head.InputMode == "L1" ||
+          head.InputMode == "L2" ||
+          head.InputMode == "M"
+        ) {
+          data.map(item => {
+            let cur = tools.dataForKey(item, head.Path);
+            if (cur) {
+              param.data.criterias.push({
+                id: item.ShaftID,
+                code: head.InfoPointCode
+              });
+            }
+          });
+        }
+      });
+      if (param.data.criterias.length) {
+        BeatchQueryParam(param, res => {
+          this.tableData = data.map(item => {
+            res.Content.map(child => {
+              if (item.ShaftID == child.id) {
+                if (child.data || child.data == 0) {
+                  this.tableHeader.map(head => {
+                    if (head.InfoPointCode == child.code) {
+                      tools.setDataForKey(item, head.Path, child.data);
+                    }
+                  });
+                } else {
+                  this.tableHeader.map(head => {
+                    if (head.InfoPointCode == child.code) {
+                      tools.setDataForKey(
+                        item,
+                        head.Path,
+                        child.error ? "表号功能号格式错误" : "表号功能号不存在"
+                      );
+                    }
+                  });
+                }
+              }
+            });
+            return item;
+          });
+          this.tableExample.loadData(this.tableData);
+        });
+      }
     }
   }
 };

+ 193 - 260
src/views/ledger/facility/addfacility.vue

@@ -7,7 +7,7 @@
       <span style="float:left;">当前选择的设备类型:{{category.name}}</span>
       <div style="width:200px;display:inline-block;text-align:left;color:gray;">
         <span>隐藏自动填充的信息</span>
-        <el-checkbox v-model="isWatch" @change="getTableHeader"></el-checkbox>
+        <el-checkbox v-model="showTypeFlag" @change="getTableHeader"></el-checkbox>
       </div>
       <span>增加</span>
       <el-input v-model="addNum" style="width:40px;" size="small"></el-input>
@@ -17,7 +17,7 @@
     <div class="tableBox">
       <div class="center middle_sty" style="flex:2;" v-show="tableData && !tableData.length">
         <p>
-          <i class="iconwushuju iconfont"></i>
+          <i class="icon-wushuju iconfont"></i>
           暂无数据
         </p>
       </div>
@@ -37,12 +37,13 @@
     <!-- 供应商弹窗 -->
     <supplier-dialog ref="supplier" @changeSupplier="supplierChange" :dialog="myDialog"></supplier-dialog>
     <guarantee-dialog :id="id" ref="guarantee" @change="guaranteeChange" :dialog="myDialog"></guarantee-dialog>
-    <upload-files-dialog :read="onlyRead ? true : false" ref="upload" @changeFile="fileChange" :keysArr="filesArr" :dialog="myDialog"></upload-files-dialog>
+    <upload-files-dialog :read="onlyRead ? true : false" ref="upload" @changeFile="fileChange" :keysArr="filesArr" :dialog="myDialog">
+    </upload-files-dialog>
     <upload-img-dialog :read="onlyRead ? true : false" @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 :read="onlyRead ? true : false" :dialog="myDialog" :keysArr="picsArr" @change="changePics"></pic-dialog>
-    <system-type :infos="systemId" :graphyId="graphyId" :dialog="myDialog" :type="'edit'" @change="changeSystemType"></system-type>
+    <system-type :device="category" :dialog="myDialog" :type="onlyRead?'read':'edit'" @change="changeSystemType" :list="systemList"></system-type>
     <details-dialog :iframeSrc="iframeSrc" v-if="myDialog.details" :dialog="myDialog"></details-dialog>
   </div>
 </template>
@@ -52,6 +53,7 @@ import handsonUtils from "@/utils/hasontableUtils";
 import showTools from "@/utils/handsontable/notShow";
 import text from "@/utils/handsontable/mainText";
 import session from "@/framework/utils/storage";
+import buildFloor from '@/utils/handsontable/buildFloorData'
 
 import handsonTable from "@/components/common/handsontable";
 import {
@@ -59,7 +61,7 @@ import {
   createEquip,
   createPropertyData,
   getEquipBelongs,
-  getSpaceFloor
+  createEquipAndProperty
 } from "@/api/scan/request";
 import { mapGetters, mapActions } from "vuex";
 
@@ -99,7 +101,6 @@ export default {
           ? session.get("deviceAddData")
           : [{ Checked: 1 }]
         : [{ Checked: 1 }],
-      isWatch: true,
       copyTableData: [],
       category: "", //当前设备类
       myDialog: {
@@ -123,26 +124,14 @@ export default {
       filesArr: [], //保存临时的文件key
       imgsArr: [], //临时保存的图片key数组
       picsArr: [], //临时设备图片keys数组
+      systemList: [], //关联的系统
       systemId: null,
       graphyId: null,
       id: 0,
-      readArr: [
-        "A1",
-        "A2",
-        "B1",
-        "C5",
-        "D1",
-        "D2",
-        "E1",
-        "F1",
-        "F2",
-        "L",
-        "L1",
-        "L2",
-        "M"
-      ],
+      showTypeFlag: true,
       EquipmentList: [],
-      firmId: "" //品牌型号所需字段--族id三位编码(传设备类id或部件类id)
+      firmId: "", //品牌型号所需字段--族id三位编码(传设备类id或部件类id)
+      buildFloorData: [],
     };
   },
   computed: {
@@ -150,8 +139,8 @@ export default {
   },
   created() {
     this.category = this.$route.query;
+    buildFloor.getData(this.buildFloorData)
     this.getBelongs();
-    this.getFloorData();
     this.getTableHeader();
   },
   methods: {
@@ -187,42 +176,6 @@ export default {
         })
       }
     },
-    //获取楼层数据
-    getFloorData() {
-      let param = {
-        ProjId: this.projectId,
-        secret: this.secret
-      }
-      getSpaceFloor(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
-        } else {
-          this.$message.error(res.data.ResultMsg)
-        }
-      }).catch(() => {
-        this.$message.error("请求出错")
-      })
-    },
     //将数组转换成optiosn格式
     changeArr(arr) {
       return arr.map(item => {
@@ -250,9 +203,12 @@ export default {
     // 获取表头数据(初始化表格)
     async getTableHeader() {
       let params = {
-        PageNumber: 1,
-        PageSize: 500,
-        Filters: `type='Equipment' or type='${this.category.deviceId}'`
+        data: {
+          Orders: "sort asc",
+          PageNumber: 1,
+          PageSize: 500
+        },
+        type: this.category.deviceId
       };
       await getDataDictionary(params, res => {
         this.tableHeader = res.Content;
@@ -285,51 +241,69 @@ export default {
         }
         // 处理建筑-楼层
         if (item.flowBuild) {
+          let bid = item.flowBuild.split("-");
           item.BuildingId = item.flowBuild.split("-")[0]
-          item.FloorId = item.flowBuild.split("-")[1]
+          if (bid[1]) {
+            item.FloorId = item.flowBuild.split("-")[1]
+          }
         }
         //处理管理的系统
         if (item.LinkSystem && item.LinkSystem.length) {
           item.SystemList = []
           item.LinkSystem.map(t => {
-            item.SystemList.push(t.id)
+            item.SystemList.push(t.SysID)
           })
         }
+        item.PropertyId = !!item.Checked;
+        item.Category = this.category.deviceId;
       })
       if (flag) {
         this.$message.info("存在设备的本地名称为空,请检查")
         return;
       }
 
-      for (let i = 0; i < newData.length; i++) {
-        let params = newData[i]
-        params.Family = this.firmId;
-        params.Category = this.category.deviceId;
-        if (newData[i].Checked) {//同时创建资产
-          await createPropertyData([params], async res => {
-            params.PropertyId = res.EntityList[0].EquipID
-            await createEquip([params], res => {
-              if (i == newData.length - 1) {
-                this.$router.push({
-                  path: "/ledger/facility",
-                  query: { deviceId: this.category.deviceId }
-                });
-                session.remove("deviceAddData")
-              }
-            })
-          })
-        } else {
-          await createEquip([params], res => {
-            if (i == newData.length - 1) {
-              this.$router.push({
-                path: "/ledger/partsmanage",
-                query: { deviceId: this.category.deviceId }
-              });
-              session.remove("deviceAddData")
-            }
-          });
-        }
-      }
+      // for (let i = 0; i < newData.length; i++) {
+      //   let params = newData[i]
+      //   params.Family = this.firmId;
+      //   params.Category = this.category.deviceId;
+      //   if (newData[i].PropertyId) {//同时创建资产
+      //     await createPropertyData([params], async res => {
+      //       params.PropertyId = res.EntityList[0].EquipID
+      //       await createEquip([params], res => {
+      //         if (i == newData.length - 1) {
+      //           this.$router.push({
+      //             path: "/ledger/facility",
+      //             query: { deviceId: this.category.deviceId }
+      //           });
+      //           session.remove("deviceAddData")
+      //         }
+      //       })
+      //     })
+      //   } else {
+      //     await createEquip([params], res => {
+      //       if (i == newData.length - 1) {
+      //         this.$router.push({
+      //           path: "/ledger/facility",
+      //           query: { deviceId: this.category.deviceId }
+      //         });
+      //         session.remove("deviceAddData")
+      //       }
+      //     });
+      //   }
+      // }
+      //待接口修改为关联创建即可修改
+      let param = {
+        Cascade: [],
+        Content: newData
+      }
+      createEquipAndProperty(param, res => {
+        this.$message.success('创建成功')
+        session.remove("deviceAddData")
+        this.$router.push({
+          name: "facilityLedger",
+          params: { deviceId: this.category.deviceId }
+        });
+      })
     },
     // 删除表格行
     handleDeleteTableRow() {
@@ -368,19 +342,8 @@ export default {
     //格式化表头显示的数据
     formatHeaderData(list) {
       let arr = tools.copyArr(list);
-      arr.map(item => {
-        item.Visible = true;
-      });
-      if (!this.onlyRead) {
-        this.readArr.push("Own");
-      }
-      let data = showTools.tableHeadFilter(
-        arr,
-        this.readArr,
-        this.onlyRead,
-        this.isWatch,
-        false
-      );
+      let showType = this.showTypeFlag ? 'partInfo' : 'all';
+      let data = showTools.headerTextFilter(arr, 'equipment', this.onlyRead, showType, true);
       data.unshift("同时创建资产", "所属系统实例");
       if (this.floorFlag) {
         data.splice(1, 0, "所属建筑楼层")
@@ -390,13 +353,8 @@ export default {
     formatHeaderType(list) {
       //格式化表头头映射的数据
       let arr = tools.copyArr(list);
-      let data = showTools.tableHeaderTypes(
-        arr,
-        this.readArr,
-        this.onlyRead,
-        this.isWatch,
-        false
-      );
+      let showType = this.showTypeFlag ? 'partInfo' : 'all';
+      let data = showTools.headerTypeFilter(arr, 'equipment', this.onlyRead, showType, true);
       data.unshift({
         type: "checkbox",
         checkedTemplate: 1,
@@ -417,7 +375,7 @@ export default {
           editor: "chosen",
           chosenOptions: {
             // multiple: true,//多选
-            data: this.floorData
+            data: this.buildFloorData
           }
         })
       }
@@ -462,16 +420,9 @@ export default {
     },
     //选择型号修改
     firmChange(data) {
-      tools.setDataForKey(this.tableData[this.row], "DPSpecificationID", data.specificationId)
       tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Brand", data.brand)
       tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Specification", data.name)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Manufacturer", data.venderName)
-      for (let key in data) {
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name + "/" + data.brand;
-          this.utilToKey(key, "venderId", data, "DPManufacturerID");
-        }
-      }
+      tools.setDataForKey(this.tableData[this.row], "DPManufacturerID", data.venderId)
     },
     supplyChange(data) {
       let changeData = { id: data };
@@ -480,17 +431,7 @@ export default {
     //如果选择供应商之后
     supplierChange(data) {
       tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.Supplier", data.name)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierWeb", data.website)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierContactor", data.man)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierPhone", data.phone)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierFax", data.fox)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierEmail", data.email)
-      for (let key in data) {
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name;
-          this.utilToKey(key, "venderId", data, "DPSupplierID");
-        }
-      }
+      tools.setDataForKey(this.tableData[this.row], "DPSupplierID", data.venderId)
     },
     //保险合同
     guaranteeChange(data) {
@@ -515,32 +456,12 @@ export default {
     //维修商变更
     changeMaintainer(data) {
       tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.Maintainer", data.name)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerWeb", data.website)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerContactor", data.man)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerPhone", data.phone)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerFax", data.fox)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerEmail", data.email)
-      for (let key in data) {
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name;
-          this.utilToKey(key, "venderId", data, "DPMaintainerID");
-        }
-      }
+      tools.setDataForKey(this.tableData[this.row], "DPMaintainerID", data.venderId)
     },
     //保险商变更
     changeInsurer(data) {
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerEmail", data.email)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerFax", data.fox)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerPhone", data.phone)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerContactor", data.man)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerWeb", data.website)
       tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.Insurer", data.name)
-      for (let key in data) {
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name;
-          this.utilToKey(key, "venderId", data, "DPInsurerID");
-        }
-      }
+      tools.setDataForKey(this.tableData[this.row], "DPInsurerID", data.venderId)
     },
     //设备图片弹窗改变事件
     changePics(keys) {
@@ -595,112 +516,124 @@ export default {
       return dataArr || [];
     },
     getInfors(infos, row) {
-      //其他的开始判断
       let val = this.tableExample.colToProp(row.col);
-      //设备二维码图片
-      if (val == "EquipQRCode") {
-        this.myDialog.qrcode = true;
-        this.$refs.qrcode.getCanvas(1111);
-      }
-      //关联系统
-      if (val == "LinkSystem") {
-        this.systemList = this.tableData[row.row].LinkSystem || [];
-        this.myDialog.systemType = true;
-      }
-      //品牌型号弹窗
-      if (val == "DPManufacturerID") {
-        this.myDialog.firm = true;
-      }
-      //供应商信息弹窗
-      if (val == "DPSupplierID") {
-        this.myDialog.supplier = true;
-      }
-      //维修商信息弹窗
-      if (val == "DPMaintainerID") {
-        this.myDialog.maintainer = true;
-      }
-      //保险公司信息
-      if (val == "DPInsurerID") {
-        this.myDialog.insurer = true;
-      }
-      //供应合同编号
-      if (val == "LedgerParam.SupplyPurchase.SupplierContractID") {
-        let falg = null;
-        let data = this.tableData[row.row].DPSupplierID;
-        if (data) {
-          falg = data.split("-")[0];
-        }
-        if (!!falg) {
-          this.id = falg;
-          this.myDialog.supply = true;
-        } else {
-          this.$message("请先选择供应商");
-        }
-      }
-      //保险单号
-      if (val == "LedgerParam.InsuranceDoc.InsuranceNum") {
-        //选择保单
-        let falg = null;
-        let data = this.tableData[row.row].DPInsurerID
-        if (data) {
-          falg = data.split("-")[0];
-        }
-        if (!!falg) {
-          this.id = falg;
-          this.myDialog.guarantee = true;
-        } else {
-          this.$message("请先选择保险商");
-        }
-      }
-      //保险文件--设备文档--安装质检报告
-      if (
-        val == "LedgerParam.InsuranceDoc.InsuranceFile" ||
-        val == "LedgerParam.PhotoDoc.Archive" ||
-        val == "LedgerParam.Siteinstall.CheckReport"
-      ) {
-        let data = tools.dataForKey(this.tableData[row.row], val)
-        this.filesArr = data ? data : []
-        // this.filesArr = this.tableData[row.row].infos
-        //   ? this.tableData[row.row].infos[val.split(".")[1]]
-        //     ? [this.tableData[row.row].infos[val.split(".")[1]]]
-        //     : []
-        //   : [];
-        this.myDialog.uploadFiles = true;
-      }
-      //安装照片--安装图纸--设备铭牌照片--设备图纸
-      if (
-        val == "LedgerParam.Siteinstall.InstallPic" ||
-        val == "LedgerParam.Siteinstall.InstallDrawing" ||
-        val == "LedgerParam.PhotoDoc.Nameplate" ||
-        val == "LedgerParam.PhotoDoc.Drawing"
-      ) {
-        let data = tools.dataForKey(this.tableData[row.row], val)
-        this.imgsArr = data ? data : []
-        // if (val == "LedgerParam.PhotoDoc.Nameplate") {
-        //   this.imgsArr = this.tableData[row.row].infos
-        //     ? this.tableData[row.row].infos[val.split(".")[1]]
-        //       ? [this.tableData[row.row].infos[val.split(".")[1]].key]
-        //       : []
-        //     : [];
-        // } else {
-        //   this.imgsArr = this.tableData[row.row].infos
-        //     ? this.tableData[row.row].infos[val.split(".")[1]]
-        //       ? [this.tableData[row.row].infos[val.split(".")[1]]]
-        //       : []
-        //     : [];
-        // }
-        this.myDialog.uploadImgs = true;
-      }
-      //设备照片
-      if (val == "LedgerParam.PhotoDoc.Pic") {
-        let data = tools.dataForKey(this.tableData[row.row], val)
-        this.picsArr = data ? data : []
-        // this.picsArr = this.tableData[row.row].infos
-        //   ? this.tableData[row.row].infos[val.split(".")[1]]
-        //     ? this.tableData[row.row].infos[val.split(".")[1]]
-        //     : []
-        //   : [];
-        this.myDialog.pic = true;
+      switch (val) {
+        //操作
+        case 'caozuo':
+          // window.open(`http://adm.sagacloud.cn:8058/spread?id=${infos.EquipID}&pid=${this.projectId}&secret=${this.secret}`,"_blank")
+          this.$message("开发中...")
+          break;
+        //设备二维码图片
+        case 'EquipQRCode':
+          this.qrcodeUrl = this.tableData[row.row].EquipQRCode;
+          if (!!this.qrcodeUrl) {
+            this.myDialog.qrcode = true;
+          } else {
+            this.$message("此设备没有设备二维码");
+          }
+          break;
+        //关联系统
+        case 'LinkSystem':
+          if (!this.onlyRead) {
+            this.systemList = this.tableData[row.row].LinkSystem || [];
+            this.myDialog.systemType = true;
+          }
+          break;
+        //关联资产
+        case 'LinkEquipLocalName':
+          if (this.linkNameFalg) {
+            this.myDialog.changeRea = true;
+          }
+          break;
+        //品牌型号弹窗
+        case 'DPManufacturerID':
+          if (!this.onlyRead) {
+            this.myDialog.firm = true;
+          }
+          break;
+        //供应商信息弹窗
+        case 'DPSupplierID':
+          if (!this.onlyRead) {
+            this.myDialog.supplier = true;
+          }
+          break;
+        //维修商信息弹窗
+        case 'DPMaintainerID':
+          if (!this.onlyRead) {
+            this.myDialog.maintainer = true;
+          }
+          break;
+        //保险公司信息
+        case 'DPInsurerID':
+          if (!this.onlyRead) {
+            this.myDialog.insurer = true;
+          }
+          break;
+        //供应合同编号
+        case 'LedgerParam.SupplyPurchase.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("请先选择供应商");
+            }
+          }
+          break;
+        //保险单号
+        case 'LedgerParam.InsuranceDoc.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("请先选择保险商");
+            }
+          }
+          break;
+        //保险文件--设备文档--安装质检报告
+        case 'LedgerParam.InsuranceDoc.InsuranceFile':
+        case 'LedgerParam.PhotoDoc.Archive':
+        case 'LedgerParam.Siteinstall.CheckReport':
+          let IPSdata = tools.dataForKey(this.tableData[row.row], val);
+          this.filesArr = IPSdata ? IPSdata : [];
+          this.myDialog.uploadFiles = true;
+          break;
+        //安装照片--安装图纸--设备铭牌照片--设备图纸
+        case 'LedgerParam.Siteinstall.InstallPic':
+        case 'LedgerParam.Siteinstall.InstallDrawing':
+        case 'LedgerParam.PhotoDoc.Nameplate':
+        case 'LedgerParam.PhotoDoc.Drawing':
+          let SSPPdata = tools.dataForKey(this.tableData[row.row], val);
+          this.imgsArr = SSPPdata ? SSPPdata : [];
+          this.myDialog.uploadImgs = true;
+          break;
+        //设备照片
+        case 'LedgerParam.PhotoDoc.Pic':
+          let Pdata = tools.dataForKey(this.tableData[row.row], val);
+          this.picsArr = Pdata ? Pdata : [];
+          this.myDialog.pic = true;
+          break;
+        //包含的部件字段
+        case 'Count':
+          if (this.onlyRead) {
+            this.$router.push({ path: '/ledger/parts', query: { deviceId: infos.EquipID } });
+          } else {
+            this.$router.push({ path: '/ledger/partsmanage', query: { deviceId: infos.EquipID, typeId: this.mess.deviceId } });
+          }
+          break;
+        default:
+          break;
       }
       this.row = row.row;
       this.messKey = val;

+ 75 - 90
src/views/ledger/facility/index.vue

@@ -1,5 +1,5 @@
 <template>
-    <div id="deviceList">
+  <div id="deviceList">
     <router-link to="/ledger/facility/addfacility"></router-link>
     <router-view></router-view>
     <saga-title :mess="mess"></saga-title>
@@ -19,10 +19,15 @@ import floorCascader from "@/components/ledger/lib/floorCascader";
 import myCascader from "@/components/ledger/lib/cascader";
 import hansonTable from "@/components/ledger/handsontables/device";
 import tableTransfers from "@/components/ledger/tableTransfers";
-import { getNumber, getFamilyList, getSpaceName, getGraphyId, getEquipmentFamily } from "@/api/scan/request"
 import {
-    mapGetters,
-    mapActions
+  getSpaceName,
+  getGraphyId,
+  getEquipmentFamily,
+  countEquip
+} from "@/api/scan/request"
+import {
+  mapGetters,
+  mapActions
 } from "vuex";
 export default {
   components: {
@@ -59,102 +64,87 @@ export default {
     };
   },
   computed: {
-        ...mapGetters("layout", [
-            "projectId",
-            "secret",
-            "userId"
-        ])
+    ...mapGetters("layout", [
+      "projectId",
+      "projects",
+      "secret",
+      "userId"
+    ])
   },
   created() {
     this.param.ProjId = this.projectId
     this.param.secret = this.secret
     this.getProjName()
+    this.getCount()
+    let deviceId = this.$route.params.deviceId;
+    if (deviceId) {
+      this.$nextTick(() => {
+        this.$refs.cascader.changeVal([deviceId])
+      })
+    }
   },
   watch: {
-      projectId() {
-          this.param.ProjId = this.projectId
-          this.param.secret = this.secret
-          this.getProjName()
-      }
+    projectId() {
+      this.param.ProjId = this.projectId
+      this.param.secret = this.secret
+      this.getProjName()
+      this.getCount()
+    }
   },
   methods: {
     getProjName() {
-      let param = {
-        list: [{ id: this.param.ProjId }],
-        perjectId: this.param.ProjId,
-        secret: this.param.secret,
-      }
-      getSpaceName(param).then(res => {
-        if (res.data.Result == "success") {
-          this.mess.perjectName = res.data.Content[0].infos.ProjLocalName
-          this.getEqCode()
-        } else {
-          this.$message.error("请求失败:" + res.data.ResultMsg)
-        }
-      }).catch(_ => {
-        this.$message.error("请求失败")
+      this.projects.forEach((item) => {
+        if(item.id == this.projectId) 
+        this.mess.perjectName = item.name
       })
+      // this.getEqCode()
     },
     close(val) {
-      this.getEqCode()
-      console.log(val)
-      if(this.$refs.cascader)
-      this.$refs.cascader.changeVal([val.code])
-      //   this.$refs.tableMain.getHeaderData(this.param);
-    },
-    getEqCode() {
-      getEquipmentFamily(res => {
-        this.assetGroupList = res.Content
-        this.getGraphyId()
-      })
-    },
-    getFamilyList() {
-      let param = {
-        ProjId: this.param.ProjId,
-        secret: this.param.secret,
-        data: { type: "Eq" }
+      this.getCount()
+      if (val && this.$refs.cascader){
+        this.$refs.cascader.changeVal([val.code])
       }
-      getFamilyList(param, res => {
-          if (this.$refs.cascader) {
-              this.$refs.cascader.pushData(res.Content)
-          }
-        
-      })
+        this.$refs.cascader.getData()
+      //   this.$refs.tableMain.getHeaderData(this.param);
     },
-    //获取header的list
-    getNumber() {
+    // getEqCode() {
+    //   getEquipmentFamily(res => {
+    //     debugger
+    //     this.assetGroupList = res.Content
+    //     this.getGraphyId()
+    //   })
+    // },
+    //获取统计数量
+    getCount() {
       let param = {
-        ProjId: this.param.ProjId,
-        secret: this.param.secret,
-        data: { type: "Eq" }
+        Filters: "not PropertyId isNull"
       }
-      getNumber(param, res => {
-        console.log(res)
-        this.mess.name[0].num = res.content.count
-        this.mess.name[1].num = res.content.bindingCount
-        this.getFamilyList()
+      countEquip({}, res => {
+        this.mess.name[0].num = res.Count
       })
-    },
-
-    getGraphyId() {
-      let param = {
-        ProjId: this.param.ProjId,
-        secret: this.param.secret,
-        type: "SystemEquip"
-      }
-      getGraphyId(param).then(res => {
-        if (res.data.Result == "success") {
-          this.graphyId = res.data.graph_id
-          if(this.$refs.tableMain)
-          this.$refs.tableMain.setGraphyId(this.graphyId, this.assetGroupList);
-          this.getNumber()
-        } else {
-          this.$message.error("请求错误:" + res.data.ResultMsg)
-        }
-      }).catch(_ => {
-        this.$message.error("请求错误")
+      countEquip(param, res => {
+        this.mess.name[1].num = res.Count
       })
     },
+    // getGraphyId() {
+    //   let param = {
+    //     ProjId: this.param.ProjId,
+    //     secret: this.param.secret,
+    //     type: "SystemEquip"
+    //   }
+    //   getGraphyId(param).then(res => {
+    //     if (res.data.Result == "success") {
+    //       debugger
+    //       this.graphyId = res.data.graph_id
+    //       if (this.$refs.tableMain)
+    //         this.$refs.tableMain.setGraphyId(this.graphyId, this.assetGroupList);
+    //     } else {
+    //       this.$message.error("请求错误:" + res.data.ResultMsg)
+    //     }
+    //   }).catch(_ => {
+    //     this.$message.error("请求错误")
+    //   })
+    // },
     //修改楼层
     changeFloor(value) {
       if (value[0]) {
@@ -166,10 +156,8 @@ export default {
         this.param.floorId = null
       }
       if (!!this.param.deviceId) {
-          if(this.$refs.tableMain)
-        this.$refs.tableMain.getHeaderData(this.param);
-      } else {
-        return;
+        if (this.$refs.tableMain)
+          this.$refs.tableMain.getHeaderData(this.param);
       }
     },
 
@@ -178,12 +166,9 @@ export default {
       this.param.deviceId = value.code
       this.param.name = value.facility
       if (!!value) {
-          if(this.$refs.tableMain)
-        this.$refs.tableMain.getHeaderData(this.param);
-      } else {
-        return;
+        if (this.$refs.tableMain)
+          this.$refs.tableMain.getHeaderData(this.param);
       }
-
     }
   }
 };
@@ -206,7 +191,7 @@ export default {
   }
   .search-header {
     overflow: hidden;
-    padding:0 10px 10px 10px;
+    padding: 0 10px 10px 10px;
     border-bottom: 1px solid #bcbcbc;
   }
 }

+ 26 - 51
src/views/ledger/facility/parts/index.vue

@@ -5,17 +5,21 @@
         <el-tab-pane v-for="t in partsTypeList" :key="t.Category" :name="t.Category" :label="t.CategoryName+'('+t.count+')'"></el-tab-pane>
       </el-tabs>
     </el-row>
-    <el-row class="right">
-      <div style="width:200px;display:inline-block;text-align:left;color:gray;">
+    <el-row class="left">
+      <!-- <div style="width:200px;display:inline-block;text-align:left;color:gray;">
         <span>只看要采集的信息</span>
         <el-checkbox v-model="allMess" @change="getTableHeader"></el-checkbox>
-      </div>
+      </div> -->
+      <el-select v-model="showType" @change="initTable" style="width:100px;margin-right:10px;vertical-align:bottom;">
+        <el-option v-for="item in showTypes" :key="item.value" :label="item.label" :value="item.value">
+        </el-option>
+      </el-select>
       <el-button @click="getTableHeader">刷新</el-button>
     </el-row>
     <div class="tableBox">
       <div class="center middle_sty" v-show="tableData && !tableData.length" style="flex:2;">
         <p>
-          <i class="iconwushuju iconfont"></i>
+          <i class="icon-wushuju iconfont"></i>
           暂无数据
         </p>
       </div>
@@ -24,10 +28,12 @@
       </div>
     </div>
     <el-pagination class="right" 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>
+      :current-page="page.pageNumber" :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper"
+      :total="page.total"></el-pagination>
     <!-- 二维码弹窗 -->
     <qrcode :dialog="myDialog" :qrcodeUrl="qrcodeUrl" :addBody="true" ref="qrcode"></qrcode>
-    <upload-files-dialog :read="onlyRead ? true : false" ref="upload" @changeFile="fileChange" :keysArr="filesArr" :dialog="myDialog"></upload-files-dialog>
+    <upload-files-dialog :read="onlyRead ? true : false" ref="upload" @changeFile="fileChange" :keysArr="filesArr" :dialog="myDialog">
+    </upload-files-dialog>
     <upload-img-dialog :read="onlyRead ? true : false" @changeFile="imgChange" :keysArr="imgsArr" :dialog="myDialog"></upload-img-dialog>
     <pic-dialog :read="onlyRead ? true : false" :dialog="myDialog" :keysArr="picsArr" @change="changePics"></pic-dialog>
   </div>
@@ -79,7 +85,6 @@ export default {
       isTableRightShow: false,
       spaceList: "",
       onlyRead: true,
-      allMess: true,
       tableHeader: [],
       page: {
         pageSize: 50,
@@ -87,26 +92,16 @@ export default {
         pageNumber: 1,
         total: 0
       },
+      showTypes: [
+        { value: "Visible", label: '只看采集信息' },
+        { value: "all", label: '全部' }
+      ],
+      showType: "Visible",
       tableData: [],
       copyTableData: [],
       tableExample: null,
       tabVal: "",
       partsTypeList: [], //tabs
-      readArr: [
-        "A1",
-        "A2",
-        "B1",
-        "C5",
-        "D1",
-        "D2",
-        "E1",
-        "F1",
-        "F2",
-        "L",
-        "L1",
-        "L2",
-        "M"
-      ],
       myDialog: {
         qrcode: false, //二维码弹窗
         firm: false, //厂商弹窗
@@ -162,9 +157,12 @@ export default {
     // 获取表头数据(初始化表格)
     async getTableHeader() {
       let params = {
-        PageNumber: 1,
-        PageSize: 500,
-        Filters: `type='Equipment' or type='${this.tabVal}'`
+        data: {
+          Orders: "sort asc",
+          PageNumber: 1,
+          PageSize: 500
+        },
+        type: this.tabVal
       };
       await getDataDictionary(params, res => {
         this.tableHeader = res.Content;
@@ -202,37 +200,14 @@ export default {
     formatHeaderData(list) {
       //格式化表头显示的数据
       let arr = tools.copyArr(list);
-      arr.map(item => {
-        item.Visible = true;
-      });
-      let data = showTools.tableHeadFilter(
-        arr,
-        this.readArr,
-        this.onlyRead,
-        false,
-        this.allMess,
-        false,
-        true
-      );
+      let data = showTools.headerTextFilter(arr, "parts", this.onlyRead, this.showType, true)
       data.unshift("查看详情", "当前关联的资产");
       return data;
     },
     formatHeaderType(list) {
       //格式化表头头映射的数据
       let arr = tools.copyArr(list);
-      arr.map(item => {
-        //缺少信息点
-        item.Visible = true;
-      });
-      let data = showTools.tableHeaderTypes(
-        arr,
-        this.readArr,
-        this.onlyRead,
-        false,
-        this.allMess,
-        false,
-        true
-      );
+      let data = showTools.headerTypeFilter(arr, "parts", this.onlyRead, this.showType, true)
       data.unshift(
         {
           data: "caozuo",
@@ -432,7 +407,7 @@ export default {
         data: []
       };
       params.map(item => {
-        param.data.push(item.EquipID);
+        param.data.push({ EquipID: item.EquipID });
       });
       this.$confirm("此操作将删除部件,是否继续?", "提示", {
         confirmButtonText: "确定",

+ 91 - 134
src/views/ledger/facility/partsmanage/addparts/index.vue

@@ -1,11 +1,15 @@
 <template>
   <div id="deviceList">
-    <el-row class="right">
-      <span style="float:left;">当前选择的部件类型:{{category.Name}}</span>
-      <div style="width:200px;display:inline-block;text-align:left;color:gray;">
+    <el-row class="left">
+      <span style="float:right;">当前选择的部件类型:{{category.Name}}</span>
+      <!-- <div style="width:200px;display:inline-block;text-align:left;color:gray;">
         <span>隐藏自动填充的信息</span>
         <el-checkbox v-model="isWatch" @change="getTableHeader"></el-checkbox>
-      </div>
+      </div> -->
+      <el-select v-model="showType" @change="initTable" style="width:100px;margin-right:10px;vertical-align:bottom;">
+        <el-option v-for="item in showTypes" :key="item.value" :label="item.label" :value="item.value">
+        </el-option>
+      </el-select>
       <span>增加</span>
       <el-input v-model="addNum" style="width:40px;" size="small"></el-input>
       <span>个{{category.Name}}</span>
@@ -14,7 +18,7 @@
     <div class="tableBox">
       <div class="center middle_sty" style="flex:2;" v-show="tableData && !tableData.length">
         <p>
-          <i class="iconwushuju iconfont"></i>
+          <i class="icon-wushuju iconfont"></i>
           暂无数据
         </p>
       </div>
@@ -34,7 +38,8 @@
     <!-- 供应商弹窗 -->
     <supplier-dialog ref="supplier" @changeSupplier="supplierChange" :dialog="myDialog"></supplier-dialog>
     <guarantee-dialog :id="id" ref="guarantee" @change="guaranteeChange" :dialog="myDialog"></guarantee-dialog>
-    <upload-files-dialog :read="onlyRead ? true : false" ref="upload" @changeFile="fileChange" :keysArr="filesArr" :dialog="myDialog"></upload-files-dialog>
+    <upload-files-dialog :read="onlyRead ? true : false" ref="upload" @changeFile="fileChange" :keysArr="filesArr" :dialog="myDialog">
+    </upload-files-dialog>
     <upload-img-dialog :read="onlyRead ? true : false" @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>
@@ -92,7 +97,12 @@ export default {
           ? session.get("partsAddData")
           : [{ Checked: 1 }]
         : [{ Checked: 1 }],
-      isWatch: true,
+      showTypes: [
+        { value: "partInfo", label: '隐藏信息点' },
+        { value: "all", label: '全部' },
+        { value: "Visible", label: '只看采集信息' }
+      ],
+      showType: "partInfo",
       copyTableData: [],
       category: "", //当前设备类
       myDialog: {
@@ -119,21 +129,6 @@ export default {
       systemId: null,
       graphyId: null,
       id: 0,
-      readArr: [
-        "A1",
-        "A2",
-        "B1",
-        "C5",
-        "D1",
-        "D2",
-        "E1",
-        "F1",
-        "F2",
-        "L",
-        "L1",
-        "L2",
-        "M"
-      ],
       EquipmentList: [],
       firmId: "" //品牌型号所需字段--族id三位编码(传设备类id或部件类id)
     };
@@ -164,9 +159,13 @@ export default {
     // 获取表头数据(初始化表格)
     async getTableHeader() {
       let params = {
-        PageNumber: 1,
-        PageSize: 500,
-        Filters: `type='Equipment' or type='${this.category.Code}'`
+        data: {
+          Orders: "sort asc",
+          PageNumber: 1,
+          PageSize: 500
+        },
+        type: this.category.Code
+        // Filters: `type='Equipment' or type='${this.category.Code}'`
       };
       await getDataDictionary(params, res => {
         this.tableHeader = res.Content;
@@ -204,40 +203,53 @@ export default {
       }
 
       for (let i = 0; i < newData.length; i++) {
-        let params = newData[i]
-        params.ParentId = this.category.deviceId, //当前设备id
-        params.Category = this.category.Code //当前部件分类
-        params.Family = this.firmId;
-        if (newData[i].Checked) {//同时创建资产
-          await createPropertyData(params, async res => {
-            params.PropertyId = res.Id
-            await createPart(params, res => {
-              if (i == newData.length - 1) {
-                this.$router.push({
-                  path: "/ledger/partsmanage",
-                  query: {
-                    deviceId: this.category.deviceId,
-                    typeId: this.category.ParentId
-                  }
-                });
-                session.remove("partsAddData")
-              }
-            })
-          })
-        } else {
-          await createPart(params, res => {
-            if (i == newData.length - 1) {
-              this.$router.push({
-                path: "/ledger/partsmanage",
-                query: {
-                  deviceId: this.category.deviceId,
-                  typeId: this.category.ParentId
-                }
-              });
-              session.remove("partsAddData")
-            }
-          });
+        newData[i].ParentId = this.category.deviceId //当前设备id
+        newData[i].Category = this.category.Code //当前部件分类
+        newData[i].Family = this.firmId;
+        //待接口修改为关联创建
+        let param = {
+          Cascade:[],
+          Content:[newData[i]]
         }
+
+        await createPart(param, async res => {
+          if (newData[i].Checked) {//同时创建资产
+            param.Content[0].EquipmentId = res.EntityList[0].EquipID
+            await createPropertyData(param, res => { })
+          }
+          if (i == newData.length - 1) {
+            this.$message.success('创建成功')
+            session.remove("partsAddData")
+            this.$router.push({
+              path: "/ledger/partsmanage",
+              query: {
+                deviceId: this.category.deviceId,
+                typeId: this.category.ParentId
+              }
+            });
+          }
+        })
+
+        // if (newData[i].Checked) {//同时创建资产
+        //   await createPropertyData([params], async res => {
+        //     params.PropertyId = res.Id
+
+        //   })
+        // } 
+        // else {
+        //   await createPart(params, res => {
+        //     if (i == newData.length - 1) {
+        //       this.$router.push({
+        //         path: "/ledger/partsmanage",
+        //         query: {
+        //           deviceId: this.category.deviceId,
+        //           typeId: this.category.ParentId
+        //         }
+        //       });
+        //       session.remove("partsAddData")
+        //     }
+        //   });
+        // }
       }
     },
     // 删除表格行
@@ -276,33 +288,15 @@ export default {
     },
     //格式化表头显示的数据
     formatHeaderData(list) {
-      let arr = tools.copyArr(list);
-      arr.map(item => {
-        item.Visible = true;
-      });
-      if (!this.onlyRead) {
-        this.readArr.push("Own");
-      }
-      let data = showTools.tableHeadFilter(
-        arr,
-        this.readArr,
-        this.onlyRead,
-        this.isWatch,
-        false
-      );
-      data.unshift("同时创建资产");
-      return data;
+      let arr = tools.copyArr(list)
+      let data = showTools.headerTextFilter(arr, "parts", this.onlyRead, this.showType, true)
+      data.unshift("同时创建资产")
+      return data
     },
     formatHeaderType(list) {
       //格式化表头头映射的数据
       let arr = tools.copyArr(list);
-      let data = showTools.tableHeaderTypes(
-        arr,
-        this.readArr,
-        this.onlyRead,
-        this.isWatch,
-        false
-      );
+      let data = showTools.headerTypeFilter(arr, "parts", this.onlyRead, this.showType, true)
       data.unshift({
         type: "checkbox",
         checkedTemplate: 1,
@@ -353,36 +347,29 @@ export default {
     },
     //选择型号修改
     firmChange(data) {
-      tools.setDataForKey(this.tableData[this.row], "DPSpecificationID", data.specificationId)
       tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Brand", data.brand)
       tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Specification", data.name)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Manufacturer", data.venderName)
-      for (let key in data) {
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name + "/" + data.brand;
-          this.utilToKey(key, "venderId", data, "DPManufacturerID");
-        }
-      }
+      tools.setDataForKey(this.tableData[this.row], "DPManufacturerID", data.venderId)
+    },
+    //供应商变更
+    supplierChange(data) {
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.Supplier", data.name)
+      tools.setDataForKey(this.tableData[this.row], "DPSupplierID", data.venderId)
+    },
+    //保险商变更
+    changeInsurer(data) {
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.Insurer", data.name)
+      tools.setDataForKey(this.tableData[this.row], "DPInsurerID", data.venderId)
+    },
+    //维修商变更
+    changeMaintainer(data) {
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.Maintainer", data.name)
+      tools.setDataForKey(this.tableData[this.row], "DPMaintainerID", data.venderId)
     },
     supplyChange(data) {
       let changeData = { id: data };
       this.utilToKey("id", "id", changeData, "SupplierContractID");
     },
-    //如果选择供应商之后
-    supplierChange(data) {
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.Supplier", data.name)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierWeb", data.website)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierContactor", data.man)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierPhone", data.phone)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierFax", data.fox)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierEmail", data.email)
-      for (let key in data) {
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name;
-          this.utilToKey(key, "venderId", data, "DPSupplierID");
-        }
-      }
-    },
     //保险合同
     guaranteeChange(data) {
       for (let key in data) {
@@ -403,36 +390,6 @@ export default {
     imgChange(keys) {
       this.setDataToMain(keys, this.messKey, this.row);
     },
-    //维修商变更
-    changeMaintainer(data) {
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.Maintainer", data.name)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerWeb", data.website)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerContactor", data.man)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerPhone", data.phone)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerFax", data.fox)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerEmail", data.email)
-      for (let key in data) {
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name;
-          this.utilToKey(key, "venderId", data, "DPMaintainerID");
-        }
-      }
-    },
-    //保险商变更
-    changeInsurer(data) {
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerEmail", data.email)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerFax", data.fox)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerPhone", data.phone)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerContactor", data.man)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerWeb", data.website)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.Insurer", data.name)
-      for (let key in data) {
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name;
-          this.utilToKey(key, "venderId", data, "DPInsurerID");
-        }
-      }
-    },
     //设备图片弹窗改变事件
     changePics(keys) {
       this.setDataToMain(keys, this.messKey, this.row);

+ 213 - 205
src/views/ledger/facility/partsmanage/index.vue

@@ -5,19 +5,29 @@
         <el-tab-pane v-for="t in partsTypeList" :key="t.Id" :name="t.Code" :label="t.Name+'('+t.Count+')'"></el-tab-pane>
       </el-tabs>
     </el-row>
-    <el-row class="right">
-      <div style="width:200px;display:inline-block;text-align:left;color:gray;">
+    <el-row class="left">
+      <!-- <div style="width:200px;display:inline-block;text-align:left;color:gray;">
         <span>隐藏自动填充的信息</span>
         <el-checkbox v-model="allMess" @change="getTableHeader"></el-checkbox>
-      </div>
+      </div> -->
+      <el-select v-model="showType" @change="initTable" style="width:100px;margin-right:10px;vertical-align:bottom;">
+        <el-option v-for="item in showTypes" :key="item.value" :label="item.label" :value="item.value">
+        </el-option>
+      </el-select>
       <el-button @click="handleCreateTableData">添加部件</el-button>
       <el-button @click="getTableHeader">刷新</el-button>
       <el-button v-show="!onlyRead" @click="undo">撤销</el-button>
+      <div style="float:right;overflow:hidden;">
+        <span style="width:20px;float:left;display:block;height:20px;cursor: pointer;" @click="changeAssetsFalg">
+          <i v-show="!onlyRead" class="el-icon-fa  el-icon-fa-compass"></i>
+        </span>
+        <span>当前筛选条件下共{{page.total || '--'}}部件</span>
+      </div>
     </el-row>
     <div class="tableBox">
       <div class="center middle_sty" v-show="tableData && !tableData.length">
         <p>
-          <i class="iconwushuju iconfont"></i>
+          <i class="icon-wushuju iconfont"></i>
           暂无数据
         </p>
       </div>
@@ -44,8 +54,8 @@
     <insurer-dialog @changeInsurer="changeInsurer" ref="insurer" :dialog="myDialog"></insurer-dialog>
     <pic-dialog :read="onlyRead ? true : false" :dialog="myDialog" :keysArr="picsArr" @change="changePics"></pic-dialog>
     <details-dialog :iframeSrc="iframeSrc" v-if="myDialog.details" :dialog="myDialog"></details-dialog>
-    <!-- 修改关联资产 -->
-    <!-- <change-rea :dialog="myDialog" :category="category"></change-rea> -->
+    <!-- 关联资产 -->
+    <change-rea @changeProperty="changeProperty" :dialog="myDialog" :category="deviceType"></change-rea>
   </div>
 </template>
 <script>
@@ -97,7 +107,12 @@ export default {
       isTableRightShow: false,
       spaceList: "",
       onlyRead: false,
-      allMess: true,
+      showTypes: [
+        { value: "partInfo", label: '隐藏信息点' },
+        { value: "all", label: '全部' },
+        { value: "Visible", label: '只看采集信息' }
+      ],
+      showType: "partInfo",
       tableHeader: [],
       page: {
         pageSize: 50,
@@ -106,7 +121,6 @@ export default {
         total: 0
       },
       tableData: [],
-      isWatch: true,
       copyTableData: [],
       tableExample: null,
       tabVal: "",
@@ -126,7 +140,6 @@ export default {
         addDevice: false,
         systemType: false,
         details: false, //详情页
-        changeRea: false,
         lookPic: false, //图片查看
         changeRea: false, //关联的资产
       },
@@ -138,23 +151,9 @@ export default {
       graphyId: null,
       mess: {},
       id: 0,
-      readArr: [
-        "A1",
-        "A2",
-        "B1",
-        "C5",
-        "D1",
-        "D2",
-        "E1",
-        "F1",
-        "F2",
-        "L",
-        "L1",
-        "L2",
-        "M"
-      ],
       EquipmentList: [],
-      firmId: "" //品牌型号所需字段--族id三位编码(传设备类id或部件类id)
+      firmId: "", //品牌型号所需字段--族id三位编码(传设备类id或部件类id)
+      deviceType:{}
     };
   },
   computed: {
@@ -176,7 +175,11 @@ export default {
         }
       }
       getEquipBelongs(params, res => {
-        this.firmId = res.Content[0].Family;
+        if (res.Content.length) {
+          this.firmId = res.Content[0].Family;
+          this.deviceType.assetType = res.Content[0].Family
+          this.deviceType.assetName = res.Content[0].FamilyName
+        }
       })
     },
     //tab页点击事件
@@ -201,9 +204,12 @@ export default {
     // 获取表头数据(初始化表格)
     async getTableHeader() {
       let params = {
-        PageNumber: 1,
-        PageSize: 500,
-        Filters: `type='Equipment' or type='${this.tabVal}'`
+        data: {
+          Orders: "sort asc",
+          PageNumber: 1,
+          PageSize: 500
+        },
+        type: this.tabVal
       };
       await getDataDictionary(params, res => {
         this.tableHeader = res.Content;
@@ -288,7 +294,7 @@ export default {
     handleCreateTableData() {
       this.activeTab.deviceId = this.deviceId;
       this.$router.push({
-        name: "addparts",
+        name: "partsadd",
         params: this.activeTab
       });
     },
@@ -303,7 +309,7 @@ export default {
         data: []
       };
       params.map(item => {
-        param.data.push(item.EquipID);
+        param.data.push({ EquipID: item.EquipID });
       });
       this.$confirm("此操作将删除部件,是否继续?", "提示", {
         confirmButtonText: "确定",
@@ -365,36 +371,15 @@ export default {
     },
     formatHeaderData(list) {
       //格式化表头显示的数据
-      let arr = tools.copyArr(list);
-      arr.map(item => {
-        item.Visible = true;
-      });
-      if (!this.onlyRead) {
-        this.readArr.push("Own");
-      }
-      let data = showTools.tableHeadFilter(
-        arr,
-        this.readArr,
-        this.onlyRead,
-        this.isWatch,
-        false
-      );
-      data.unshift("查看详情", "当前关联的资产");
-      return data;
+      let arr = tools.copyArr(list)
+      let data = showTools.headerTextFilter(arr, "parts", this.onlyRead, this.showType, true)
+      data.unshift("查看详情", "当前关联的资产")
+      return data
     },
     formatHeaderType(list) {
       //格式化表头头映射的数据
       let arr = tools.copyArr(list);
-      arr.map(item => {
-        item.Visible = true;
-      });
-      let data = showTools.tableHeaderTypes(
-        arr,
-        this.readArr,
-        this.onlyRead,
-        this.isWatch,
-        false
-      );
+      let data = showTools.headerTypeFilter(arr, "parts", this.onlyRead, this.showType, true)
       data.unshift(
         {
           data: "caozuo",
@@ -446,36 +431,38 @@ export default {
     },
     //选择型号修改
     firmChange(data) {
-      tools.setDataForKey(this.tableData[this.row], "DPSpecificationID", data.specificationId);
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Brand", data.brand);
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Specification", data.name);
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Manufacturer", data.venderName);
-      for (let key in data) {
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name + "/" + data.brand;
-          this.utilToKey(key, "venderId", data, "DPManufacturerID");
-        }
-      }
+      tools.setDataForKey(this.tableData[this.row], "DPManufacturerID", data.venderId)
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Brand", data.brand)
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Specification", data.name)
+      this.handleUpdataTable([[this.row, "DPManufacturerID", null, data.venderId]], "edit")
+      this.handleUpdataTable([[this.row, "LedgerParam.EquipManufactor.Brand", null, data.brand]], "edit")
+      this.handleUpdataTable([[this.row, "LedgerParam.EquipManufactor.Specification", null, data.name]], "edit")
+    },
+    //供应商变更
+    supplierChange(data) {
+      tools.setDataForKey(this.tableData[this.row], "DPSupplierID", data.venderId)
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.Supplier", data.name)
+      this.handleUpdataTable([[this.row, "DPSupplierID", null, data.venderId]], "edit")
+      this.handleUpdataTable([[this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]], "edit")
+    },
+    //保险商变更
+    changeInsurer(data) {
+      tools.setDataForKey(this.tableData[this.row], "DPInsurerID", data.venderId)
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.Insurer", data.name)
+      this.handleUpdataTable([[this.row, "DPInsurerID", null, data.venderId]], "edit")
+      this.handleUpdataTable([[this.row, "LedgerParam.InsuranceDoc.Insurer", null, data.name]], "edit")
+    },
+    //维修商变更
+    changeMaintainer(data) {
+      tools.setDataForKey(this.tableData[this.row], "DPMaintainerID", data.venderId)
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.Maintainer", data.name)
+      this.handleUpdataTable([[this.row, "DPMaintainerID", null, data.venderId]], "edit")
+      this.handleUpdataTable([[this.row, "LedgerParam.OperationMainte.Maintainer", null, data.name]], "edit")
     },
     supplyChange(data) {
       let changeData = { id: data };
       this.utilToKey("id", "id", changeData, "SupplierContractID");
     },
-    //如果选择供应商之后
-    supplierChange(data) {
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.Supplier", data.name);
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierWeb", data.website);
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierContactor", data.man);
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierPhone", data.phone);
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierFax", data.fox);
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierEmail", data.email);
-      for (let key in data) {
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name;
-          this.utilToKey(key, "venderId", data, "DPSupplierID");
-        }
-      }
-    },
     //保险合同
     guaranteeChange(data) {
       for (let key in data) {
@@ -488,6 +475,11 @@ export default {
         this.utilToKey(key, "contractFile", data, "InsuranceFile");
       }
     },
+    //修改关联的资产
+    changeProperty(val) {
+      this.setDataToMain(val.PropertyId, 'PropertyId', this.row);
+      this.setDataToMain(val.LinkEquipLocalName, 'LinkEquipLocalName', this.row);
+    },
     //上传文件弹窗触发事件
     fileChange(keys) {
       this.setDataToMain(keys, this.messKey, this.row);
@@ -496,36 +488,6 @@ export default {
     imgChange(keys) {
       this.setDataToMain(keys, this.messKey, this.row);
     },
-    //维修商变更
-    changeMaintainer(data) {
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.Maintainer", data.name);
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerWeb", data.website);
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerContactor", data.man);
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerPhone", data.phone);
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerFax", data.fox);
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerEmail", data.email);
-      for (let key in data) {
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name;
-          this.utilToKey(key, "venderId", data, "DPMaintainerID");
-        }
-      }
-    },
-    //保险商变更
-    changeInsurer(data) {
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerEmail", data.email);
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerFax", data.fox);
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerPhone", data.phone);
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerContactor", data.man);
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerWeb", data.website);
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.Insurer", data.name);
-      for (let key in data) {
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name;
-          this.utilToKey(key, "venderId", data, "DPInsurerID");
-        }
-      }
-    },
     //设备图片弹窗改变事件
     changePics(keys) {
       this.setDataToMain(keys, this.messKey, this.row);
@@ -575,100 +537,128 @@ export default {
       return dataArr || [];
     },
     getInfors(infos, row) {
-      //其他的开始判断
-      let val = this.tableExample.colToProp(row.col);
-      if (val == "caozuo") {
-        // window.open(`http://adm.sagacloud.cn:8058/spread?id=${infos.EquipID}&pid=${this.projectId}&secret=${this.secret}`,"_blank")
-        this.$message("开发中...")
-      }
-      //设备二维码图片
-      if (val == "EquipQRCode") {
-        this.qrcodeUrl = this.tableData[row.row].EquipQRCode;
-        if (!!this.qrcodeUrl) {
-          this.myDialog.qrcode = true;
-        } else {
-          this.$message("此设备没有设备二维码");
-        }
-      }
-      //关联系统
-      if (val == "linkSystem") {
-        // this.systemList = this.tableData[row.row].linkSystem || [];
-        this.myDialog.systemType = true;
-      }
-      //品牌型号弹窗
-      if (val == "DPManufacturerID") {
-        this.myDialog.firm = true;
-      }
-      //供应商信息弹窗
-      if (val == "DPSupplierID") {
-        this.myDialog.supplier = true;
-      }
-      //维修商信息弹窗
-      if (val == "DPMaintainerID") {
-        this.myDialog.maintainer = true;
-      }
-      //保险公司信息
-      if (val == "DPInsurerID") {
-        this.myDialog.insurer = true;
-      }
-      //供应合同编号
-      if (val == "LedgerParam.SupplyPurchase.SupplierContractID") {
-        let falg = null;
-        let data = this.tableData[row.row].DPSupplierID;
-        if (data) {
-          falg = data.split("-")[0];
-        }
-        if (!!falg) {
-          this.id = falg;
-          this.myDialog.supply = true;
-        } else {
-          this.$message("请先选择供应商");
-        }
-      }
-      //保险单号
-      if (val == "LedgerParam.InsuranceDoc.InsuranceNum") {
-        //选择保单
-        let falg = null;
-        let data = this.tableData[row.row].DPInsurerID;
-        if (data) {
-          falg = data.split("-")[0];
-        }
-        if (!!falg) {
-          this.id = falg;
-          this.myDialog.guarantee = true;
-        } else {
-          this.$message("请先选择保险商");
-        }
-      }
-      //保险文件--设备文档--安装质检报告
-      if (
-        val == "LedgerParam.InsuranceDoc.InsuranceFile" ||
-        val == "LedgerParam.PhotoDoc.Archive" ||
-        val == "LedgerParam.Siteinstall.CheckReport"
-      ) {
-        let data = tools.dataForKey(this.tableData[row.row], val);
-        this.filesArr = data ? data : [];
-        this.myDialog.uploadFiles = true;
-      }
-      //安装照片--安装图纸--设备铭牌照片--设备图纸
-      if (
-        val == "LedgerParam.Siteinstall.InstallPic" ||
-        val == "LedgerParam.Siteinstall.InstallDrawing" ||
-        val == "LedgerParam.PhotoDoc.Nameplate" ||
-        val == "LedgerParam.PhotoDoc.Drawing"
-      ) {
-        let data = tools.dataForKey(this.tableData[row.row], val);
-        this.imgsArr = data ? data : [];
-        this.myDialog.uploadImgs = true;
-      }
-      //设备照片
-      if (val == "LedgerParam.PhotoDoc.Pic") {
-        let data = tools.dataForKey(this.tableData[row.row], val);
-        this.picsArr = data ? data : [];
-        this.myDialog.pic = true;
-      }
       this.row = row.row;
       this.messKey = val;
+      let val = this.tableExample.colToProp(row.col);
+      switch (val) {
+        //操作
+        case 'caozuo':
+          // window.open(`http://adm.sagacloud.cn:8058/spread?id=${infos.EquipID}&pid=${this.projectId}&secret=${this.secret}`,"_blank")
+          this.$message("开发中...")
+          break;
+        //设备二维码图片
+        case 'EquipQRCode':
+          this.qrcodeUrl = this.tableData[row.row].EquipQRCode;
+          if (!!this.qrcodeUrl) {
+            this.myDialog.qrcode = true;
+          } else {
+            this.$message("此设备没有设备二维码");
+          }
+          break;
+        //关联系统
+        case 'LinkSystem':
+          if (!this.onlyRead) {
+            this.curDevice = infos.EquipID;
+            this.systemList = this.tableData[row.row].LinkSystem || [];
+            this.myDialog.systemType = true;
+          }
+          break;
+        //关联资产
+        case 'PropertyLocalName':
+          if (this.linkNameFalg) {
+            this.myDialog.changeRea = true;
+          }
+          break;
+        //品牌型号弹窗
+        case 'DPManufacturerID':
+          if (!this.onlyRead) {
+            this.myDialog.firm = true;
+          }
+          break;
+        //供应商信息弹窗
+        case 'DPSupplierID':
+          if (!this.onlyRead) {
+            this.myDialog.supplier = true;
+          }
+          break;
+        //维修商信息弹窗
+        case 'DPMaintainerID':
+          if (!this.onlyRead) {
+            this.myDialog.maintainer = true;
+          }
+          break;
+        //保险公司信息
+        case 'DPInsurerID':
+          if (!this.onlyRead) {
+            this.myDialog.insurer = true;
+          }
+          break;
+        //供应合同编号
+        case 'LedgerParam.SupplyPurchase.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("请先选择供应商");
+            }
+          }
+          break;
+        //保险单号
+        case 'LedgerParam.InsuranceDoc.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("请先选择保险商");
+            }
+          }
+          break;
+        //保险文件--设备文档--安装质检报告
+        case 'LedgerParam.InsuranceDoc.InsuranceFile':
+        case 'LedgerParam.PhotoDoc.Archive':
+        case 'LedgerParam.Siteinstall.CheckReport':
+          let IPSdata = tools.dataForKey(this.tableData[row.row], val);
+          this.filesArr = IPSdata ? IPSdata : [];
+          this.myDialog.uploadFiles = true;
+          break;
+        //安装照片--安装图纸--设备铭牌照片--设备图纸
+        case 'LedgerParam.Siteinstall.InstallPic':
+        case 'LedgerParam.Siteinstall.InstallDrawing':
+        case 'LedgerParam.PhotoDoc.Nameplate':
+        case 'LedgerParam.PhotoDoc.Drawing':
+          let SSPPdata = tools.dataForKey(this.tableData[row.row], val);
+          this.imgsArr = SSPPdata ? SSPPdata : [];
+          this.myDialog.uploadImgs = true;
+          break;
+        //设备照片
+        case 'LedgerParam.PhotoDoc.Pic':
+          let Pdata = tools.dataForKey(this.tableData[row.row], val);
+          this.picsArr = Pdata ? Pdata : [];
+          this.myDialog.pic = true;
+          break;
+        //包含的部件字段
+        case 'Count':
+          if (this.onlyRead) {
+            this.$router.push({ path: '/ledger/parts', query: { deviceId: infos.EquipID } });
+          } else {
+            this.$router.push({ path: '/ledger/partsmanage', query: { deviceId: infos.EquipID, typeId: this.mess.deviceId } });
+          }
+          break;
+        default:
+          break;
+      }
     },
     utilToKey(key, name, data, messName) {
       if (key == name) {
@@ -688,7 +678,25 @@ export default {
       } else {
         tools.setDataForKey(this.tableData[row], key, "");
       }
-    }
+    },
+    //修改资产
+    changeAssetsFalg() {
+      if (this.linkNameFalg) {
+        this.linkNameFalg = false
+      } else {
+        this.$confirm('<p>真的要在这里修改部件关联的资产么?</p><p>真的能通过列表信息找到想关联的资产么?</p><p>在这里修改关联的资产一定是因为之前关联错了要修改么?</p>', '提示', {
+          dangerouslyUseHTMLString: true,
+          confirmButtonText: '没错!我要改关联的资产',
+          cancelButtonText: '我就点开看看',
+          confirmButtonClass: 'cancelButtonClass',
+          cancelButtonClass: 'cancelButtonClass'
+        }).then(_ => {
+          this.linkNameFalg = true
+        }).catch(_ => {
+          this.$message("取消")
+        })
+      }
+    },
   }
 };
 </script>

+ 511 - 9
src/views/ledger/property/addproperty.vue

@@ -1,15 +1,517 @@
 <template>
-    <div>22222222222222</div>
+  <div id="deviceList">
+    <el-row class="right">
+      <span style="float:left;">当前选择的设备族:{{category.name}}</span>
+      <div style="width:200px;display:inline-block;text-align:left;color:gray;">
+        <span>隐藏自动填充的信息</span>
+        <el-checkbox v-model="showTypeFlag" @change="getTableHeader"></el-checkbox>
+      </div>
+      <span>增加</span>
+      <el-input v-model="addNum" style="width:40px;" size="small"></el-input>
+      <span>个{{category.name}}</span>
+      <el-button @click="handleAddTableRow">增加</el-button>
+    </el-row>
+    <div class="tableBox">
+      <div class="center middle_sty" style="flex:2;" v-show="tableData && !tableData.length">
+        <p>
+          <i class="icon-wushuju iconfont"></i>
+          暂无数据
+        </p>
+      </div>
+      <div class="tableLeft" v-show="tableData && tableData.length">
+        <handson-table ref="table"></handson-table>
+      </div>
+    </div>
+    <el-row class="center">
+      <el-button type="primary" size="medium" @click="handleCreateTableData" class="create_button">创建资产</el-button>
+    </el-row>
+    <!-- 型号弹窗 -->
+    <firm :mess="{deviceId: category.Family}" ref="firm" @changeFirm="firmChange" :dialog="myDialog"></firm>
+    <!-- 供应商合同弹窗 -->
+    <supply-dialog ref="supply" @change="supplyChange" :id="id" :dialog="myDialog"></supply-dialog>
+    <!-- 供应商弹窗 -->
+    <supplier-dialog ref="supplier" @changeSupplier="supplierChange" :dialog="myDialog"></supplier-dialog>
+    <guarantee-dialog :id="id" ref="guarantee" @change="guaranteeChange" :dialog="myDialog"></guarantee-dialog>
+    <upload-files-dialog :read="onlyRead ? true : false" ref="upload" @changeFile="fileChange" :keysArr="filesArr" :dialog="myDialog"></upload-files-dialog>
+    <upload-img-dialog :read="onlyRead ? true : false" @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 :read="onlyRead ? true : false" :dialog="myDialog" :keysArr="picsArr" @change="changePics"></pic-dialog>
+    <details-dialog :iframeSrc="iframeSrc" v-if="myDialog.details" :dialog="myDialog"></details-dialog>
+  </div>
 </template>
+<script>
+import tools from "@/utils/scan/tools"
+import handsonUtils from "@/utils/hasontableUtils"
+import showTools from "@/utils/handsontable/notShow"
+import text from "@/utils/handsontable/mainText"
+import session from "@/framework/utils/storage"
+import buildFloor from '@/utils/handsontable/buildFloorData'
 
+import handsonTable from "@/components/common/handsontable"
+import { getDataDictionary, createPropertyData } from "@/api/scan/request"
+import { mapGetters, mapActions } from "vuex"
 
-<script>
+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"
 export default {
-    
-}
+  components: {
+    firm, //品牌型号弹窗
+    supplyDialog,
+    supplierDialog,
+    maintainerDialog,
+    insurerDialog,
+    guaranteeDialog,
+    uploadFilesDialog,
+    uploadImgDialog,
+    picDialog,
+    handsonTable
+  },
+  data() {
+    return {
+      addNum: 1,
+      onlyRead: false,
+      buildFloorData: [],
+      tableHeader: [],
+      tableData: session.get("propertyAddData")
+        ? session.get("propertyAddData").length
+          ? session.get("propertyAddData")
+          : [{}]
+        : [{}],
+      copyTableData: [],
+      category: "", //当前设备类
+      myDialog: {
+        firm: false, //厂商弹窗
+        supply: false, //选择供应合同
+        supplier: false, //供应商选择
+        guarantee: false, //选择保单
+        maintainer: false, //选择维修商
+        insurer: false, //选择保险公司
+        uploadFiles: false, //上传文件
+        uploadImgs: false, //上传单个图片
+        pic: false, //多个图片
+        addDevice: false,
+        systemType: false,
+        details: false, //详情页
+        lookPic: false //图片查看
+      },
+      qrcodeUrl: "", //二维码图片地址
+      filesArr: [], //保存临时的文件key
+      imgsArr: [], //临时保存的图片key数组
+      picsArr: [], //临时设备图片keys数组
+      systemId: null,
+      graphyId: null,
+      id: 0,
+      showTypeFlag: true,
+      EquipmentList: []
+    };
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"])
+  },
+  created() {
+    this.category = this.$route.query;
+    buildFloor.getData(this.buildFloorData)
+    this.getTableHeader();
+  },
+  methods: {
+    // 获取表头数据(初始化表格)
+    async getTableHeader() {
+      let params = {
+        data: {
+          Orders: "sort asc",
+          PageNumber: 1,
+          PageSize: 500
+        },
+        type: this.category.Family
+      };
+      await getDataDictionary(params, res => {
+        this.tableHeader = res.Content;
+        this.initTable();
+      });
+    },
+    // 创建资产数据
+    async handleCreateTableData() {
+      let params = {}
+      let newData = this.tableData.filter(item => {
+        let keys = Object.keys(item)
+        keys.map(key => {
+          //将值为空字符串的属性删除
+          if (item[key] == "") {
+            delete item[key];
+          }
+        });
+        let newK = Object.keys(item)
+        if (keys.length && newK.length) {
+          return item;
+        }
+      })
+      if (!newData.length) {
+        this.$message("创建信息为空,请录入信息后再创建!");
+        return;
+      }
+      let flag = false;
+      newData.map(item => {
+				item.Family = this.category.Family
+        if (!item.EquipLocalName) {
+          flag = true
+        }
+        // 处理建筑-楼层
+        if (item.flowBuild) {
+					let BuildingId = item.flowBuild.split("-")[0]
+					let FloorId = item.flowBuild.split("-")[1]
+					if (BuildingId && FloorId) {
+						item.BuildingId = BuildingId
+          	item.FloorId = FloorId
+					} else if (BuildingId && !FloorId) {
+						item.BuildingId = BuildingId
+					}
+				}
+      })
+      if (flag) {
+        this.$message.info("存在设备的本地名称为空,请检查")
+        return;
+			}
+			params.Content = newData
+			await createPropertyData(params, res => {
+        this.$message.success("添加成功!")
+        session.remove("propertyAddData")
+				this.$router.push({
+					name: "propertyLedger",
+					params: { Family: this.category.Family }
+				})
+			})
+    },
+    // 删除表格行
+    handleDeleteTableRow() {
+      this.$message.success("删除成功")
+      this.formaTableData()
+    },
+    // 添加行
+    handleAddTableRow() {
+      let addRowLength = this.addNum
+      for(let i = 0; i < addRowLength; i++){
+        this.tableData.push({})
+      }
+      this.initTable()
+      this.formaTableData()
+    },
+    //修改
+    handleUpdataTable(changeData, source) {
+      this.formaTableData()
+    },
+    //保存去掉空字段的新增数据
+    formaTableData() {
+      let newData = this.tableData.filter(item => {
+        let keys = Object.keys(item)
+        keys.map(key => {
+          //将值为空字符串的属性删除
+          if (item[key] == "") {
+            delete item[key]
+          }
+        })
+        if (keys.length && Object.keys(item).length) {
+          return item;
+        }
+      })
+      session.set("propertyAddData", newData);
+    },
+    //格式化表头显示的数据
+    formatHeaderData(list) {
+      let arr = tools.copyArr(list)
+      let showType = this.showTypeFlag?'partInfo':'all'
+      let data = showTools.headerTextFilter(arr, 'property', this.onlyRead, showType, true)
+      data.unshift("所属建筑楼层")
+      return data
+    },
+    //格式化表头头映射的数据
+    formatHeaderType(list) {
+      let arr = tools.copyArr(list)
+      let showType = this.showTypeFlag?'partInfo':'all'
+      let data = showTools.headerTypeFilter(arr, 'property', this.onlyRead, showType, true)
+      data.unshift({
+        data: "flowBuild",
+        renderer: tools.customDropdownRenderer,
+        editor: "chosen",
+        chosenOptions: {
+            data: this.buildFloorData
+        }
+      })
+      return data
+    },
+    initTable() {
+      //实例化表格
+      let settings = {
+        data: this.tableData,
+        colHeaders: this.formatHeaderData(this.tableHeader),
+        columns: this.formatHeaderType(this.tableHeader),
+        rowHeights: 30,
+        maxRows: this.tableData.length,
+        contextMenu: {
+          items: {
+            remove_row: {
+              name: "删除资产"
+            }
+          }
+        },
+        // 事件
+        afterChange: this.handleUpdataTable, //修改后
+        afterFilter: this.trimmedRows, //排序前
+        afterRemoveRow: this.handleDeleteTableRow, //右键删除
+        afterOnCellMouseDown: this.handleTdClick //鼠标点击
+      };
+      this.$nextTick(() => {
+        this.tableExample = this.$refs.table.init(settings);
+      });
+    },
+    //去除数组中相同的元素
+    array_diff(a, b) {
+      for (var i = 0; i < b.length; i++) {
+        for (var j = 0; j < a.length; j++) {
+          if (a[j] == b[i]) {
+            a.splice(j, 1);
+            j = j - 1;
+          }
+        }
+      }
+      return a;
+    },
+    //选择型号修改
+    firmChange(data) {
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Brand", data.brand)
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Specification", data.name)
+      tools.setDataForKey(this.tableData[this.row], "DPManufacturerID", data.venderId)
+    },
+    supplyChange(data) {
+      let changeData = { id: data };
+      this.utilToKey("id", "id", changeData, "SupplierContractID");
+    },
+    //如果选择供应商之后
+    supplierChange(data) {
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.Supplier", data.name)
+      tools.setDataForKey(this.tableData[this.row], "DPSupplierID", data.venderId)
+    },
+    //保险合同
+    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");
+      }
+    },
+    //上传文件弹窗触发事件
+    fileChange(keys) {
+      this.setDataToMain(keys, this.messKey, this.row);
+    },
+    //上传图片弹窗触发事件
+    imgChange(keys) {
+      this.setDataToMain(keys, this.messKey, this.row);
+    },
+    //维修商变更
+    changeMaintainer(data) {
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.Maintainer", data.name)
+      tools.setDataForKey(this.tableData[this.row], "DPMaintainerID", data.venderId)
+    },
+    //保险商变更
+    changeInsurer(data) {
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.Insurer", data.name)
+      tools.setDataForKey(this.tableData[this.row], "DPInsurerID", data.venderId)
+    },
+    //设备图片弹窗改变事件
+    changePics(keys) {
+      this.setDataToMain(keys, this.messKey, this.row);
+    },
+    //表格点击事件
+    handleTdClick(el, rowArr) {
+      //点击的是表头
+      if (rowArr.row < 0) {
+        return;
+      }
+      //被筛选过后的数组
+      let trimmedArr = this.trimmedRows();
+      //是否启用了排序
+      let isSort = this.tableExample.getPlugin("columnSorting").isSorted();
+      if (trimmedArr.length && isSort) {
+        let sortArr = this.myHotArr.getPlugin("columnSorting").rowsMapper
+          .__arrayMap;
+        let infos = this.tableData[trimmedArr[sortArr[rowArr.row]]];
+        this.getInfors(infos, { row: sortArr[rowArr.row], col: rowArr.col });
+      } else if (isSort) {
+        //排序后的数组
+        let sortArr = this.tableExample.getPlugin("columnSorting").rowsMapper
+          .__arrayMap;
+        let infos = this.tableData[sortArr[rowArr.row]];
+        this.getInfors(infos, { row: sortArr[rowArr.row], col: rowArr.col });
+      } else if (trimmedArr.length) {
+        let infos = this.tableData[trimmedArr[rowArr.row]];
+        this.getInfors(infos, { row: trimmedArr[rowArr.row], col: rowArr.col });
+      } else {
+        let infos = this.tableData[rowArr.row];
+        this.getInfors(infos, rowArr);
+      }
+    },
+    //获取被筛选掉的行号
+    trimmedRows() {
+      var plugin = this.tableExample.getPlugin("trimRows").trimmedRows;
+      let dataLength = this.tableData.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 || [];
+    },
+    getInfors(infos, row) {
+      let val = this.tableExample.colToProp(row.col);
+      switch (val) {
+        //品牌型号弹窗
+        case 'DPManufacturerID':
+          if (!this.onlyRead) {
+            this.myDialog.firm = true;
+          }
+          break;
+        //供应商信息弹窗
+        case 'DPSupplierID':
+          if (!this.onlyRead) {
+            this.myDialog.supplier = true;
+          }
+          break;
+        //维修商信息弹窗
+        case 'DPMaintainerID':
+          if (!this.onlyRead) {
+            this.myDialog.maintainer = true;
+          }
+          break;
+        //保险公司信息
+        case 'DPInsurerID':
+          if (!this.onlyRead) {
+            this.myDialog.insurer = true;
+          }
+          break;
+        //供应合同编号
+        case 'LedgerParam.SupplyPurchase.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("请先选择供应商");
+            }
+          }
+          break;
+        //保险单号
+        case 'LedgerParam.InsuranceDoc.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("请先选择保险商");
+            }
+          }
+          break;
+        //保险文件--设备文档--安装质检报告
+        case 'LedgerParam.InsuranceDoc.InsuranceFile':
+        case 'LedgerParam.PhotoDoc.Archive':
+        case 'LedgerParam.Siteinstall.CheckReport':
+          let IPSdata = tools.dataForKey(this.tableData[row.row], val);
+          this.filesArr = IPSdata ? IPSdata : [];
+          this.myDialog.uploadFiles = true;
+          break;
+        //安装照片--安装图纸--设备铭牌照片--设备图纸
+        case 'LedgerParam.Siteinstall.InstallPic':
+        case 'LedgerParam.Siteinstall.InstallDrawing':
+        case 'LedgerParam.PhotoDoc.Nameplate':
+        case 'LedgerParam.PhotoDoc.Drawing':
+          let SSPPdata = tools.dataForKey(this.tableData[row.row], val);
+          this.imgsArr = SSPPdata ? SSPPdata : [];
+          this.myDialog.uploadImgs = true;
+          break;
+        //设备照片
+        case 'LedgerParam.PhotoDoc.Pic':
+          let Pdata = tools.dataForKey(this.tableData[row.row], val);
+          this.picsArr = Pdata ? Pdata : [];
+          this.myDialog.pic = true;
+          break;
+        default:
+          break;
+      }
+      this.row = row.row;
+      this.messKey = val;
+    },
+    utilToKey(key, name, data, messName) {
+      if (key == name) {
+        this.setDataToMain(data[key], messName, this.row);
+      }
+    },
+    //判断是否有值,有值赋值
+    setDataToMain(data, key, row) {
+      if (!!data && data != "--") {
+        if (!!this.tableData[row]) {
+          //铭牌照片特殊处理
+          tools.setDataForKey(this.tableData[row], key, data)
+          // this.tableData[row][key] = data;
+        } else {
+          this.tableData[row] = {};
+          tools.setDataForKey(this.tableData[row], key, data)
+        }
+      } else {
+        tools.setDataForKey(this.tableData[row], key, "")
+      }
+    }
+  }
+};
 </script>
-
-
-<style>
-
-</style>
+<style lang="less" scoped>
+#deviceList {
+  overflow: hidden;
+  height: 100%;
+  background-color: #fff;
+  padding: 10px;
+  position: relative;
+  .right {
+    background: #fff;
+  }
+  .search-header {
+    overflow: hidden;
+    padding: 0 10px 10px 10px;
+    border-bottom: 1px solid #bcbcbc;
+  }
+  .tableBox {
+    display: flex;
+    height: calc(100% - 100px);
+    margin-top: 10px;
+    .tableLeft {
+      flex: 1;
+    }
+  }
+  .create_button {
+    margin-top: 10px;
+  }
+}
+</style>

+ 225 - 0
src/views/ledger/property/addpropertys.vue

@@ -0,0 +1,225 @@
+<template>
+  <div class="box">
+    <div class="condition">
+      <div class="header">
+        <i style="float:left;font-size:30px;padding-right:10px;cursor:pointer;" title="返回" @click="goBack" class="el-icon-back"></i>
+        <die-cascader ref="dieCascader" :Family="params.Family" @change="changeDevice"></die-cascader>
+        <floor-cascader ref="floorCascader" @change="changeFloor"></floor-cascader>
+        <el-button style="float:right;margin-top:1px;" @click="handleClickCreate">创建已选</el-button>
+      </div>
+      <div class="main">
+        <el-table ref="multipleTable" :data="tableData" v-loading='loading' stripe height="100%" @selection-change="handleSelectionChange">
+          <el-table-column type="selection" width="55"></el-table-column>
+          <el-table-column label="设备名称" width="200">
+            <template slot-scope="scope">{{ scope.row.EquipLocalName?scope.row.EquipLocalName:scope.row.EquipName }}</template>
+          </el-table-column>
+          <el-table-column label="设备本地编码" show-overflow-tooltip>
+            <template slot-scope="scope">{{ scope.row.EquipLocalID?scope.row.EquipLocalID:scope.row.EquipID }}</template>
+          </el-table-column>
+          <el-table-column prop="Category" label="设备类型" show-overflow-tooltip width="200"></el-table-column>
+          <el-table-column prop="BuildingId" label="所属建筑"></el-table-column>
+          <el-table-column prop="FloorId" label="所属楼层"></el-table-column>
+          <el-table-column prop="address" label="操作" width="100">
+            <template slot-scope="scope">
+              <el-button @click.native.prevent="handleOpenDetail(scope.row, tableData)" type="text" size="small">详情</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <div class=footer>
+        <el-pagination
+          class="right"
+          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>
+    </div>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from "vuex"
+//组件
+import floorCascader from "@/components/ledger/lib/floorCascader"
+import dieCascader from "@/components/ledger/lib/partsDieList"
+//api
+import { queryPartsDie, createPropertys } from "@/api/scan/request";
+export default {
+  data() {
+    return {
+      params: {},
+      loading: false,
+      page: {
+        pageSize: 50,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0
+      },
+      tableData: [],
+      multipleSelection:[]
+    }
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId", "userId", "secret"])
+  },
+  components: {
+    floorCascader,
+    dieCascader
+  },
+  created() {
+    this.params = this.$route.query
+  },
+  mounted() {
+    if (this.params.category) {
+      this.$refs.dieCascader.setValue([this.params.category])
+    }
+    if (this.params.buildId && this.params.floorId) {
+      this.$refs.floorCascader.setValue([this.params.buildId,this.params.floorId])
+    } else if (this.params.buildId && !this.params.floorId) {
+      this.$refs.floorCascader.setValue([this.params.buildId])
+    } else {
+      this.$refs.floorCascader.setValue(['all'])
+    }
+  },
+  watch: {
+    projectId() {}
+  },
+  methods: {
+    //返回
+    goBack() {
+      this.$router.push({
+        name: "propertyLedger",
+        params: { Family: this.params.Family }
+      })
+    },
+    //选择设备或部件
+    changeDevice(val) {
+      if(val.code) {
+        this.params.category = val.code
+      } else {
+        this.params.category = ''
+      }
+      this.getTableData()
+    },
+    //选择建筑楼层
+    changeFloor(value) {
+      if (value[0]) {
+        this.params.buildId = value[0]
+      }
+      if (value[1]) {
+        this.params.floorId = value[1]
+      } else {
+        this.params.floorId = ''
+      }
+      this.getTableData()
+    },
+    //获取表格数据
+    getTableData() {
+      this.loading = true
+      let param = this.formatFilter()
+      queryPartsDie(param, res => {
+        this.tableData = res.Content
+        this.page.total = res.Total
+        this.loading = false
+      })
+    },
+    //格式化条件
+    formatFilter() {
+      let param = {
+        Filters: `category='${this.params.category}';PropertyId isNull`,
+        Orders: "createTime desc, EquipID asc",
+        PageNumber: this.page.pageNumber,
+        PageSize: this.page.pageSize
+      }
+
+      if (this.params.buildId == "noKnow") {
+        param.Filters += `;buildingId isNull`
+      } else if (this.params.buildId && this.params.buildId != "all") {
+        param.Filters += `;buildingId='${this.params.buildId}'`
+      }
+
+      if (this.params.floorId == "noKnow") {
+        param.Filters += `;floorId isNull`
+      } else if (this.params.floorId && this.params.floorId != "all") {
+        param.Filters += `;floorId='${this.params.floorId}'`
+      }
+
+      return param
+    },
+    //选择的设备或部件
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    //切换每页显示多少条数据
+    handleSizeChange(val) {
+      this.page.pageSize = val
+      this.getTableData()
+    },
+    //切换页数
+    handleCurrentChange(val) {
+      this.page.pageNumber = val
+      this.getTableData()
+    },
+    //查看详情
+    handleOpenDetail(row) {
+      // window.open(`http://adm.sagacloud.cn:8058/spread?id=${row.EquipID}&pid=${this.projectId}&secret=${this.secret}`,"_blank")
+      this.$message("开发中...")
+    },
+    //创建已选
+    handleClickCreate() {
+      let list = this.multipleSelection.map((item) => {
+        return item.EquipID
+      })
+      let param = {
+        Filters: `EquipID in ${JSON.stringify(list)}`
+      }
+      createPropertys(param, res => {
+        this.$message.success("创建成功!")
+        this.$router.push({
+          name: "propertyLedger",
+          params: { Family: this.params.Family }
+        })
+      })
+    }
+  }
+};
+</script>
+
+<style scoped lang='less'>
+.box {
+  .condition {
+    padding: 10px;
+    display: flex;
+    height: 100%;
+    flex-direction: column;
+    border: 1px solid #dfe6ec;
+    background: #fff;
+    margin-bottom: 10px;
+    .header{
+      padding-bottom: 10px;
+      border-bottom: 1px solid #bcbcbc;
+    }
+    .main{
+      margin-top: 10px;
+      height: calc(100% - 96px);
+    }
+    .footer{
+      margin-bottom: 10px;
+    }
+  }
+}
+</style>
+
+<style lang="less">
+.el-table th {
+  background-color: #d9d9d9;
+  color: #000;
+}
+</style>
+

+ 30 - 35
src/views/ledger/property/index.vue

@@ -1,6 +1,3 @@
-<!--
-    设备清单
--->
 <template>
   <div id="deviceList">
     <saga-title :mess="mess"></saga-title>
@@ -24,7 +21,7 @@ import {
     mapGetters,
     mapActions
 } from "vuex";
-import { getNumber, getFamilyList, getSpaceName } from "@/api/scan/request"
+import { countProperty, queryProperty } from "@/api/scan/request"
 import "./../index.scss"
 export default {
   components: {
@@ -37,6 +34,7 @@ export default {
   computed: {
         ...mapGetters("layout", [
             "projectId",
+            "projects",
             "secret",
             "userId"
         ])
@@ -67,42 +65,42 @@ export default {
     };
   },
   created() {
-      this.param.ProjId = this.projectId
-      this.param.secret = this.secret
+    this.param.ProjId = this.projectId
+    this.param.secret = this.secret
     this.getProjName()
+    this.getNumber()
+    let Family = this.$route.params.Family
+    if (Family) {
+      this.$nextTick(() => {
+        this.$refs.cascader.changeVal([Family])
+      })
+    }
   },
   watch: {
     projectId() {
         this.param.ProjId = this.projectId
         this.param.secret = this.secret
         this.getProjName()
+        this.getNumber()
     }
   },
   methods: {
     getProjName() {
-      let param = {
-        list: [{ id: this.param.ProjId }],
-        perjectId: this.param.ProjId,
-        secret: this.param.secret,
-      }
-      getSpaceName(param).then(res => {
-        if (res.data.Result == "success") {
-          this.mess.perjectName = res.data.Content[0].infos.ProjLocalName
-          this.getNumber()
-        } else {
-          this.$message.error("请求失败:" + res.data.ResultMsg)
-        }
-      }).catch(_ => {
-        this.$message.error("请求失败")
+      this.projects.forEach((item) => {
+        if(item.id == this.projectId) 
+        this.mess.perjectName = item.name
       })
     },
     getFamilyList() {
       let param = {
-        ProjId: this.param.ProjId,
-        secret: this.param.secret,
-        data: { type: "Pe" }
+        Distinct: true,
+        PageNumber: 1,
+        PageSize: 500,
+        Projection: [
+          "Family"
+        ]
       }
-      getFamilyList(param, res => {
+      queryProperty(param, res => {
         if (this.$refs.cascader) {
               this.$refs.cascader.pushData(res.Content)
           }
@@ -110,14 +108,11 @@ export default {
     },
     //获取header的list
     getNumber() {
-      let param = {
-        ProjId: this.param.ProjId,
-        secret: this.param.secret,
-        data: { type: "Pe" }
-      }
-      getNumber(param, res => {
-        this.mess.name[0].num = res.content.count
-        this.mess.name[1].num = res.content.bindingCount
+      countProperty({}, res => {
+        this.mess.name[0].num = res.Count
+      })
+      countProperty({"Filters": "not EquipmentId isNull"}, res => {
+        this.mess.name[1].num = res.Count
         this.getFamilyList()
       })
     },
@@ -132,7 +127,7 @@ export default {
         this.param.floorId = null
       }
       if (!!this.param.deviceId) {
-          if(this.$refs.tableMain)
+        if(this.$refs.tableMain)
         this.$refs.tableMain.getHeaderData(this.param);
       } else {
         return;
@@ -146,7 +141,7 @@ export default {
       this.param.deviceId = val.code
       this.getNumber()
       if (!!this.param.deviceId) {
-          if(this.$refs.tableMain)
+        if(this.$refs.tableMain)
         this.$refs.tableMain.getHeaderData(this.param);
       }
     },
@@ -156,7 +151,7 @@ export default {
       console.log(value)
       this.param.deviceId = value.code
       if (!!value) {
-          if(this.$refs.tableMain)
+        if(this.$refs.tableMain)
         this.$refs.tableMain.getHeaderData(this.param);
       } else {
         return;

+ 0 - 0
src/views/rent/rentlist/index.vue


Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.