|
@@ -258,9 +258,11 @@
|
|
|
<div>
|
|
|
<p><span class="bold">设备名称:</span>{{ curRow.deviceName }}</p>
|
|
|
<p><span class="bold">设备代码:</span>{{ curRow.deviceCode }}</p>
|
|
|
- <p><span class="bold">归属设施:</span>{{ curRow.refFacs }}</p>
|
|
|
- <p><span class="bold">归属区域:</span>{{ curRow.areaPath }}</p>
|
|
|
- <p><span class="bold">子系统:</span>{{ curRow.subsystemName }}</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>{{ 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>
|
|
|
<p>
|
|
|
<span class="bold">设备状态:</span>
|
|
|
<span :class="getDeviceStatusClass(curRow.deviceStatus)">
|
|
@@ -442,7 +444,7 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
this.getList()
|
|
|
- this.getAreaTree('0', false)
|
|
|
+ this.getAreaTree('0', 2)
|
|
|
this.getFacsOptions()
|
|
|
this.getSubsystem()
|
|
|
this.getSubCategorygetByCode()
|
|
@@ -597,9 +599,18 @@ export default {
|
|
|
abilityParam: row.abilityParam
|
|
|
}).then(response => {
|
|
|
this.$message({ message: '设备能力执行成功', type: 'success' })
|
|
|
-
|
|
|
})
|
|
|
},
|
|
|
+ // 根据区域代码获取区域名称
|
|
|
+ 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;
|
|
|
+ },
|
|
|
handleOperate(row) {
|
|
|
listcallAbility({
|
|
|
abilityKey: row.abilityKey,
|
|
@@ -609,9 +620,11 @@ export default {
|
|
|
abilityParam: row.abilityParam
|
|
|
}).then(response => {
|
|
|
this.$message({ message: '设备能力执行成功', type: 'success' })
|
|
|
-
|
|
|
})
|
|
|
},
|
|
|
+ getPsName(psName) {
|
|
|
+ return psName === null ? '' : ' - '+psName;
|
|
|
+ },
|
|
|
getDeviceStatus(status) {
|
|
|
return status === 1 ? '在线' : '离线'
|
|
|
},
|
|
@@ -659,8 +672,8 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
/** 查询区域树结构 */
|
|
|
- getAreaTree(areaCode, recursion) {
|
|
|
- areaTreeSelect(areaCode, recursion).then(response => {
|
|
|
+ getAreaTree(areaCode, layer) {
|
|
|
+ areaTreeSelect(areaCode, layer).then(response => {
|
|
|
this.treeAreaOptions = [{
|
|
|
id: null,
|
|
|
label: '全部',
|
|
@@ -736,12 +749,7 @@ export default {
|
|
|
},
|
|
|
deviceCategoryChange() {
|
|
|
this.reset()
|
|
|
- if (this.queryParams.deviceCategory === 'E' || this.queryParams.deviceCategory === 'W'
|
|
|
- || this.queryParams.deviceCategory === 'T' || this.queryParams.deviceCategory === 'C') {
|
|
|
- this.getAreaTree('0', false)
|
|
|
- } else if (this.queryParams.deviceCategory === 'Z') {
|
|
|
- this.getAreaTree('0', true)
|
|
|
- }
|
|
|
+ this.getAreaTree('0', 2)
|
|
|
this.getSubCategorygetByCode()
|
|
|
this.getFacsOptions()
|
|
|
this.handleQuery()
|