dengrui 2 місяців тому
батько
коміт
ebbda27a69
2 змінених файлів з 5 додано та 2 видалено
  1. 1 1
      .env.development
  2. 4 1
      src/views/pro-steps/index.vue

+ 1 - 1
.env.development

@@ -11,7 +11,7 @@ VITE_APP_BASE_API = '/dev-api'
 VITE_APP_UPLOAD_URL = 'http://192.168.1.4:9000'
 
 # 开发接口地址
-VITE_APP_API_URL = 'http://192.168.1.101:8059'
+VITE_APP_API_URL = 'http://192.168.1.3:8059'
 # Websocket地址
 VITE_WEBSOCKET_URL = 'ws://192.168.101.178:8079'
 ``

+ 4 - 1
src/views/pro-steps/index.vue

@@ -267,6 +267,8 @@ const seqVal = ref("");
 const snVal = ref(null);
 const selectProduct = async (index) => {
   taskIndex.value = index;
+  selectIndex.value = 0;
+  //设置数据
   store.odersData.workOrderCode =
     taskArray.value[taskIndex.value].workOrderCode;
   store.processInfo.materialName =
@@ -287,7 +289,7 @@ const selectProduct = async (index) => {
     ElMessage.warning("暂无操作步骤");
   }
   if (snVal.value != null) {
-    await getScanData();
+    await init(0);
   } else {
     ElMessage.warning("当前工序暂不可操作");
   }
@@ -456,6 +458,7 @@ const init = async (index) => {
     return;
   }
   selectStepIndex.value = index != null ? index : 0;
+  //数据设置
   store.odersData.operationId =
     taskArray.value[taskIndex.value].ops[selectStepIndex.value].operationId;
   store.processInfo.operationCode =