|
|
@@ -6,7 +6,7 @@
|
|
|
<template v-if="!loading">
|
|
|
<warning
|
|
|
v-if="error"
|
|
|
- @click="getDefaults"
|
|
|
+ @click="getSendingCard"
|
|
|
/>
|
|
|
<template v-else>
|
|
|
<template v-if="info">
|
|
|
@@ -88,7 +88,7 @@
|
|
|
<script>
|
|
|
import { mapGetters } from 'vuex'
|
|
|
import {
|
|
|
- getDeviceSendingCard,
|
|
|
+ getSendingCard,
|
|
|
getSendingCardManufacturers,
|
|
|
getSendingCards,
|
|
|
bindSendingCard,
|
|
|
@@ -143,17 +143,17 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
activated () {
|
|
|
- !this.info && this.getDeviceSendingCard()
|
|
|
+ !this.info && this.getSendingCard()
|
|
|
},
|
|
|
methods: {
|
|
|
- getDeviceSendingCard () {
|
|
|
+ getSendingCard () {
|
|
|
if (this.loading) {
|
|
|
return
|
|
|
}
|
|
|
this.info = null
|
|
|
this.loading = true
|
|
|
this.error = false
|
|
|
- getDeviceSendingCard(this.device.id).then(
|
|
|
+ getSendingCard(this.device.id).then(
|
|
|
data => {
|
|
|
this.info = data
|
|
|
},
|
|
|
@@ -170,7 +170,7 @@ export default {
|
|
|
onChoose ({ value, done }) {
|
|
|
bindSendingCard(this.device.id, value.id).then(() => {
|
|
|
done()
|
|
|
- this.getDeviceSendingCard()
|
|
|
+ this.getSendingCard()
|
|
|
})
|
|
|
},
|
|
|
onUnbind () {
|
|
|
@@ -178,7 +178,7 @@ export default {
|
|
|
'解绑发送控制设备?',
|
|
|
{ type: 'warning' }
|
|
|
).then(() => {
|
|
|
- unbind(this.info.id).then(this.getDeviceSendingCard)
|
|
|
+ unbind(this.info.id).then(this.getSendingCard)
|
|
|
})
|
|
|
}
|
|
|
}
|