| | |
| | | <text class="uni-nav-bar-text">{{navigationBarTitle }}</text> |
| | | </view> |
| | | <template v-slot:right> |
| | | <view class="uni-navbar-btn-text"> |
| | | <a @click="clickSave" class="uni-nav-bar-right-text"> |
| | | <view class="uni-navbar-btn-text" @click="clickSave"> |
| | | <a class="uni-nav-bar-right-text"> |
| | | 保存 |
| | | </a> |
| | | </view> |
| | | |
| | | </template> |
| | | <template v-slot:left> |
| | | <view class="uni-navbar-btn-text"> |
| | | <a @click="clickCancel" class="uni-nav-bar-left-text"> |
| | | <view class="uni-navbar-btn-text" @click="clickCancel"> |
| | | <a class="uni-nav-bar-left-text"> |
| | | 取消 |
| | | </a> |
| | | </view> |
| | |
| | | <view class="group"> |
| | | <view class="item line"> |
| | | <view>名称:</view> |
| | | <input class="input" v-model="vehicleName"> </input> |
| | | <input class="input" v-model="vehicleName"/> |
| | | </view> |
| | | <view class="item line"> |
| | | <view>ip地址:</view> |
| | |
| | | <script> |
| | | import { |
| | | showToast, |
| | | showModal |
| | | showModal, |
| | | showError, |
| | | showInfo |
| | | } from "@/comm/utils.js" |
| | | import { |
| | | Button |
| | |
| | | const info = await shellVersion(this.vehicleIp) |
| | | this.car_version = info.software_version |
| | | } catch (ex) { |
| | | this.showError(ex) |
| | | showError(ex) |
| | | } |
| | | }, |
| | | clickDelete() { |
| | | showModal(`确定要删除设备“${ this.vehicleInfo.name}”吗`, "警告").then((res) => { |
| | | showModal(`确定要删除设备“${ this.vehicleInfo.name}”吗`, "警告",true,"确定","取消").then((res) => { |
| | | if (res) { |
| | | const eventChannel = this.getOpenerEventChannel(); |
| | | eventChannel.emit('delete_vehicle', this.vehicleInfo); |
| | |
| | | delta: 1 |
| | | }) |
| | | }, |
| | | showError(ex) { |
| | | let exStr = JSON.stringify(ex) |
| | | if (exStr == "{}") |
| | | exStr = ex |
| | | let tip = typeof ex.msg == "string" ? ex.msg : exStr |
| | | showModal(tip, "错误", false) |
| | | }, |
| | | |
| | | |
| | | } |
| | | } |