|
@@ -374,12 +374,11 @@
|
|
<div>
|
|
<div>
|
|
<p><span class="bold">设备名称:</span>{{ curRow.deviceName }}</p>
|
|
<p><span class="bold">设备名称:</span>{{ curRow.deviceName }}</p>
|
|
<p><span class="bold">设备代码:</span>{{ curRow.deviceCode }}</p>
|
|
<p><span class="bold">设备代码:</span>{{ curRow.deviceCode }}</p>
|
|
|
|
+ <p><span class="bold">设备分类:</span>{{ curRow.deviceCategoryName + getPsName(curRow.psName)}}</p>
|
|
<p><span class="bold">归属设施:</span>{{ curRow.refFacsName }}</p>
|
|
<p><span class="bold">归属设施:</span>{{ curRow.refFacsName }}</p>
|
|
- <p><span class="bold">设备分类:</span>{{ curRow.deviceCategoryName + '-' + curRow.psName}}</p>
|
|
|
|
- <p><span class="bold">归属区域:</span>{{ getAreaNameByCode(curRow.areaCode) }}</p>
|
|
|
|
- <p><span class="bold">归属子区:</span>{{ curRow.locationRefName }}</p>
|
|
|
|
- <p><span class="bold">安装位置:</span>{{ curRow.location}}</p>
|
|
|
|
- <p><span class="bold">子系统:</span>{{ curRow.subsystemName }}</p>
|
|
|
|
|
|
+ <p><span class="bold">归属区域:</span>{{ buildRefAreaName(curRow) }}</p>
|
|
|
|
+ <p><span class="bold">安装位置:</span>{{ curRow.location === null ? '无' : curRow.location }}</p>
|
|
|
|
+ <p><span class="bold">归属系统:</span>{{ curRow.subsystemName === null ? '无' : curRow.subsystemName}}</p>
|
|
</div>
|
|
</div>
|
|
<div class="footer">
|
|
<div class="footer">
|
|
<div class="footer">
|
|
<div class="footer">
|
|
@@ -592,7 +591,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { listDevRecursionByArea, getDevice, delDevice, addDevice, updateDevice } from '@/api/device/device'
|
|
import { listDevRecursionByArea, getDevice, delDevice, addDevice, updateDevice } from '@/api/device/device'
|
|
-import { areaTreeSelect, getAreaTreeSelect } from '@/api/basecfg/area'
|
|
|
|
|
|
+import { areaTreeSelect } from '@/api/basecfg/area'
|
|
import { getFacsCategorygetByCode, listAllFacs } from '@/api/basecfg/emsfacs'
|
|
import { getFacsCategorygetByCode, listAllFacs } from '@/api/basecfg/emsfacs'
|
|
import { listSubsystemAll } from '@/api/adapter/subsystem'
|
|
import { listSubsystemAll } from '@/api/adapter/subsystem'
|
|
import { getModelByCode, listAllModel } from '@/api/basecfg/objModel'
|
|
import { getModelByCode, listAllModel } from '@/api/basecfg/objModel'
|
|
@@ -814,9 +813,14 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
// 根据区域代码获取区域名称
|
|
// 根据区域代码获取区域名称
|
|
- getAreaNameByCode(areaCode) {
|
|
|
|
- const area = this.areaOptions.find(a => a.id === areaCode);
|
|
|
|
- return area ? area.label : '未知区域';
|
|
|
|
|
|
+ buildRefAreaName(curRow) {
|
|
|
|
+ const area = this.treeAreaOptions.find(a => a.id === curRow.areaCode);
|
|
|
|
+ const areaName = area ? area.label : '未知区域';
|
|
|
|
+
|
|
|
|
+ if (curRow.locationRef !== curRow.areaCode) {
|
|
|
|
+ return areaName + ' - ' + curRow.locationRefName;
|
|
|
|
+ }
|
|
|
|
+ return areaName;
|
|
},
|
|
},
|
|
/** 归属设施*/
|
|
/** 归属设施*/
|
|
handleFacilityChange(selectedFacilityCode) {
|
|
handleFacilityChange(selectedFacilityCode) {
|
|
@@ -834,13 +838,13 @@ export default {
|
|
},
|
|
},
|
|
/**下拉归属区域*/
|
|
/**下拉归属区域*/
|
|
loadAreaOptions() {
|
|
loadAreaOptions() {
|
|
- getAreaTreeSelect('0', 1).then(response => {
|
|
|
|
|
|
+ areaTreeSelect('0', 1).then(response => {
|
|
this.areaOptions = response.data || []
|
|
this.areaOptions = response.data || []
|
|
})
|
|
})
|
|
},
|
|
},
|
|
/**下拉归属子区*/
|
|
/**下拉归属子区*/
|
|
loadSubAreaOptions(rootCode) {
|
|
loadSubAreaOptions(rootCode) {
|
|
- getAreaTreeSelect(rootCode, 2).then(response => {
|
|
|
|
|
|
+ areaTreeSelect(rootCode, 2).then(response => {
|
|
this.subAreaOptions = response.data || []
|
|
this.subAreaOptions = response.data || []
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -1036,7 +1040,7 @@ export default {
|
|
},
|
|
},
|
|
/** 查询区域树结构 */
|
|
/** 查询区域树结构 */
|
|
getAreaTree(areaCode, layer) {
|
|
getAreaTree(areaCode, layer) {
|
|
- getAreaTreeSelect(areaCode, layer).then(response => {
|
|
|
|
|
|
+ areaTreeSelect(areaCode, layer).then(response => {
|
|
this.treeAreaOptions = [{
|
|
this.treeAreaOptions = [{
|
|
id: null,
|
|
id: null,
|
|
label: '全部',
|
|
label: '全部',
|
|
@@ -1373,7 +1377,9 @@ export default {
|
|
updateAttrValue(attrKey, newValue) {
|
|
updateAttrValue(attrKey, newValue) {
|
|
this.attrValuesMap[attrKey] = newValue
|
|
this.attrValuesMap[attrKey] = newValue
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+ getPsName(psName) {
|
|
|
|
+ return psName === null ? '' : ' - '+psName;
|
|
|
|
+ },
|
|
getFacsModel() {
|
|
getFacsModel() {
|
|
listAllModel(2).then(response => {
|
|
listAllModel(2).then(response => {
|
|
this.modelList = response.data
|
|
this.modelList = response.data
|