|
@@ -51,6 +51,7 @@
|
|
:rowKey="record => record.id"
|
|
:rowKey="record => record.id"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:dataSource="equipmentData"
|
|
:dataSource="equipmentData"
|
|
|
|
+ :loading="loading"
|
|
:pagination="false"
|
|
:pagination="false"
|
|
bordered>
|
|
bordered>
|
|
<!-- 设备状态 -->
|
|
<!-- 设备状态 -->
|
|
@@ -59,7 +60,8 @@
|
|
</template>
|
|
</template>
|
|
<!-- 工作状态 -->
|
|
<!-- 工作状态 -->
|
|
<template slot="state" slot-scope="text, record">
|
|
<template slot="state" slot-scope="text, record">
|
|
- <span :class="record.state==0 ? 'red' : record.state==1 ? 'green' : ''">{{ record.state == 0 ? '已禁用' : record.state == 1 ? '已启用' : '--' }}</span>
|
|
|
|
|
|
+ <span v-if="record.deviceType!='STEELYARD'" :class="record.state==0 ? 'red' : record.state==1 ? 'green' : ''">{{ record.state == 0 ? '已禁用' : record.state == 1 ? '已启用' : '--' }}</span>
|
|
|
|
+ <span v-else>--</span>
|
|
</template>
|
|
</template>
|
|
</a-table>
|
|
</a-table>
|
|
</div>
|
|
</div>
|
|
@@ -97,7 +99,8 @@ export default {
|
|
{ title: '工作状态', scopedSlots: { customRender: 'state' }, width: 200, align: 'center' },
|
|
{ title: '工作状态', scopedSlots: { customRender: 'state' }, width: 200, align: 'center' },
|
|
{ title: '箱体类型', dataIndex: 'deviceTypeName', width: 200, align: 'center' }
|
|
{ title: '箱体类型', dataIndex: 'deviceTypeName', width: 200, align: 'center' }
|
|
],
|
|
],
|
|
- equipmentData: []
|
|
|
|
|
|
+ equipmentData: [],
|
|
|
|
+ loading: false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -111,6 +114,7 @@ export default {
|
|
},
|
|
},
|
|
// 已绑设备
|
|
// 已绑设备
|
|
getDevice () {
|
|
getDevice () {
|
|
|
|
+ this.loading = true
|
|
deviceListQuery({ stationNo: this.networkNo }).then(res => {
|
|
deviceListQuery({ stationNo: this.networkNo }).then(res => {
|
|
console.log(res)
|
|
console.log(res)
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
@@ -121,6 +125,7 @@ export default {
|
|
} else {
|
|
} else {
|
|
this.equipmentData = []
|
|
this.equipmentData = []
|
|
}
|
|
}
|
|
|
|
+ this.loading = false
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -132,6 +137,7 @@ export default {
|
|
// 重定义的弹框状态
|
|
// 重定义的弹框状态
|
|
isShow (newValue, oldValue) {
|
|
isShow (newValue, oldValue) {
|
|
if (!newValue) {
|
|
if (!newValue) {
|
|
|
|
+ this.equipmentData = []
|
|
this.$emit('close')
|
|
this.$emit('close')
|
|
}
|
|
}
|
|
},
|
|
},
|