huangxw 1 hete
szülő
commit
e380c884a0
1 módosított fájl, 4 hozzáadás és 5 törlés
  1. 4 5
      src/plant/print/models/connect-printer.vue

+ 4 - 5
src/plant/print/models/connect-printer.vue

@@ -11,7 +11,6 @@
             <up-button @click="handleStartSearch" class="mb-30" type="primary" :disabled="isConnected">
                 {{ isSearching ? '搜索中...' : '开始搜索' }}
             </up-button>
-            <up-button v-if="isConnected" @click="handleDisconnect" class="mb-30" type="warning"> 断开连接 </up-button>
             <view class="d-flex a-c j-c">
                 <up-button @click="prevSteps" class="mr-30" plain type="primary">上一步</up-button>
                 <up-button @click="nextSteps" type="primary">下一步</up-button>
@@ -247,10 +246,10 @@ const handleDisconnect = async () => {
     connectedDevice.value = null;
 };
 const nextSteps = () => {
-    // if (!connectedDevice.value) {
-    //     toast('请先连接设备');
-    //     return;
-    // }
+    if (!connectedDevice.value || !connectedDevice.value?.deviceId || !connectedDevice.value?.serviceId) {
+        toast('请先连接设备');
+        return;
+    }
    emit('next', {
       info: {
         ...props.info,