Browse Source

登录添加stationIP,扫码开工赋值,编号填写修改,可以打开鸿蒙设备列表。

jiaxiaoqiang 11 months ago
parent
commit
61f8d16469

+ 1 - 0
src/api/user/types.ts

@@ -14,6 +14,7 @@ export interface UserInfo {
   stationType?: string;
   notice?: boolean;
   stationCode?: string;
+  stationIP?: string;
 }
 
 /**

File diff suppressed because it is too large
+ 4 - 0
src/assets/icons/hongDa_black.svg


+ 16 - 0
src/layout/components/header.vue

@@ -21,6 +21,14 @@
         <div>
           <svg-icon
             class="activeNotice"
+            icon-class="hongDa_black"
+            size="48"
+            @click="goToDevice"
+          />
+        </div>
+        <div>
+          <svg-icon
+            class="activeNotice"
             icon-class="lingdang"
             size="48"
             @click="messageStatus = !messageStatus"
@@ -142,6 +150,14 @@ const handleCommand = (command: string | number | object) => {
     ElMessage.success("设置成功!");
   }
 };
+const goToDevice = () => {
+  let p = {
+    stationIP: userStore.user.stationIP,
+  };
+  if (window.openHarmonyBridge && window.openHarmonyBridge.goToDevicePage) {
+    window.openHarmonyBridge.goToDevicePage(JSON.stringify(p));
+  }
+};
 </script>
 
 <style lang="scss" scoped>

+ 1 - 0
src/store/modules/user.ts

@@ -56,6 +56,7 @@ export const useUserStore = defineStore(
             user.value.deptId = data.deptId;
             user.value.stationType = data.stationType;
             user.value.stationCode = data.stationCode;
+            user.value.stationIP = data.stationIp;
             isGetAuth.value = true;
 
             user.value.perms = data.permissions ?? [];

+ 23 - 17
src/views/pro-operation/write-number/index.vue

@@ -1,26 +1,34 @@
 <template>
-  <div style="display: flex;align-items: center;width: 100%;height:70vh;justify-content: center;">
-    <el-form :model="queryData" label-width="100px" ref="formRef">
+  <div
+    style="
+      display: flex;
+      align-items: center;
+      width: 100%;
+      height: 70vh;
+      justify-content: center;
+    "
+  >
+    <el-form ref="formRef" :model="queryData" label-width="100px">
       <el-form-item label="流转卡号">
-        <div v-text="formData.seqNo" />
+        <div v-text="formData.seqNo"></div>
       </el-form-item>
       <el-form-item label="绑定编号">
-        <el-input  style="width:250px;" v-model="formData.nameplateNo" />
+        <el-input v-model="formData.nameplateNo" style="width: 250px" />
       </el-form-item>
       <el-form-item>
         <el-button class="sureBtn" type="primary" @click="saveSeqInfoF"
-        >保 存
+          >保 存
         </el-button>
       </el-form-item>
     </el-form>
   </div>
-
 </template>
 
 <script setup>
 import { useProcessStore } from "@/store/modules/processView";
-import { querySeqInfo,saveSeqInfo } from "@/api/process/index";
-const formData = ref({})
+import { querySeqInfo, saveSeqInfo } from "@/api/process/index";
+
+const formData = ref({});
 
 const saveSeqInfoF = async () => {
   const { data, code } = await saveSeqInfo({
@@ -28,34 +36,32 @@ const saveSeqInfoF = async () => {
   });
   if (code == "200") {
     ElMessage.success("操作成功!");
-    toBack()
+    toBack();
   }
 };
 const querySeqInfoF = async () => {
   const { data, code } = await querySeqInfo(
-      processStore.odersData.workOrderCode,processStore.useSeqNo,
+    processStore.odersData.workOrderCode,
+    processStore.scanInfo.seqNo
   );
-  formData.value =data
+  formData.value = data;
 };
 const processStore = useProcessStore();
-const toBack = () => {
-};
+const toBack = () => {};
 onMounted(() => {
   querySeqInfoF();
 });
-onUnmounted(() => {
-
-});
+onUnmounted(() => {});
 </script>
 
 <style lang="scss" scoped>
-
 .body {
   width: 100vw;
   height: calc(100vh - 120px);
   display: flex;
   align-items: center;
   justify-content: center;
+
   .checkBody {
     width: 30vw;
     align-items: center;

+ 2 - 0
src/views/process/components/scanCode.vue

@@ -13,6 +13,7 @@ import ScanCodeInput from "@/components/ScanCodeInput/index.vue";
 import { useProcessStore } from "@/store";
 import { getScan } from "@/api/process";
 import { emitter, EventsNames } from "@/utils/common";
+
 const store = useProcessStore();
 const router = useRouter();
 const inputValue = ref("");
@@ -67,6 +68,7 @@ const getScanData = async () => {
   });
   if (code == "200") {
     store.scanInfo = data;
+    store.useSeqNo = data.seqNo;
     router.push({ path: "/pro-steps" });
   }
   inputValue.value = "";

+ 1 - 1
src/views/process/components/transferNum.vue

@@ -84,7 +84,7 @@ onMounted(() => {
     vertical-align: center;
 
     .status {
-      width: 50px;
+      width: 60px;
       font-size: 18px;
       line-height: 24px;
       margin-bottom: 10px;