重定位
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { rebootVehicle } from '../../config/getData.js'
|
||||
import { mapGetters, mapActions } from 'vuex'
|
||||
export default {
|
||||
data () {
|
||||
@@ -125,7 +126,7 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.initLink()
|
||||
this._rebootVehicle()
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
@@ -133,6 +134,23 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
async _rebootVehicle () {
|
||||
try {
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.6)'
|
||||
})
|
||||
let res = await rebootVehicle()
|
||||
if (res) {
|
||||
this.initLink()
|
||||
}
|
||||
this.loading.close()
|
||||
} catch (e) {
|
||||
this.$message.error(e)
|
||||
this.loading.close()
|
||||
}
|
||||
},
|
||||
initLink () {
|
||||
let link = 'stservice://systech.com:8088/router?data=reboot'
|
||||
const a = document.createElement('a')
|
||||
|
||||
Reference in New Issue
Block a user