cyy
2025-09-28 fb026e6052b4d843d327312db398cf791ac57ab9
pages/index/detail.vue
@@ -6,16 +6,16 @@
            <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>
@@ -26,7 +26,7 @@
         <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>
@@ -71,7 +71,9 @@
<script>
   import {
      showToast,
      showModal
      showModal,
      showError,
      showInfo
   } from "@/comm/utils.js"
   import {
      Button
@@ -129,11 +131,11 @@
               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);
@@ -164,13 +166,7 @@
               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)
         },
      }
   }