From 14d77c9bb703abedaf182a4c69138c9eebd2ffcd Mon Sep 17 00:00:00 2001
From: Crunchy <3114200645@qq.com>
Date: 星期一, 05 八月 2024 20:26:52 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/main.js                                 |    4 +-
 src/view/timer.vue                          |   71 +++++++++++++++++++++++++++++++++++
 src/components/view/b1-inspection-order.vue |   30 +++++++-------
 src/view/index.vue                          |    4 +
 4 files changed, 91 insertions(+), 18 deletions(-)

diff --git a/src/components/view/b1-inspection-order.vue b/src/components/view/b1-inspection-order.vue
index 158a138..a5d4366 100644
--- a/src/components/view/b1-inspection-order.vue
+++ b/src/components/view/b1-inspection-order.vue
@@ -374,7 +374,7 @@
                           <el-col  style="font-weight: bold;"><span>瑙勬牸鍨嬪彿:&nbsp; </span>{{ item.model }}</el-col>
                         </el-row>
                         <el-row style="margin-top: 1px;font-size: 14px;">
-                          <el-col  style="font-weight: bold;"><span>鏍峰搧鍚嶇О:&nbsp; </span>{{ item.sampleName }}</el-col>
+                          <el-col  style="font-weight: bold;"><span>鏍峰搧鍚嶇О:&nbsp; </span>{{ item.sample }}</el-col>
                         </el-row>
                         <el-row style="margin-top: 1px;font-size: 14px;" class="ellipsis-multiline">
                           <el-col  style="font-weight: bold;"><span>妫�娴嬮」鐩�:&nbsp; </span>{{ item.item }}</el-col>
@@ -401,31 +401,31 @@
       </span>
     </el-dialog>
     <div class="el-dialog__body" style="overflow-y: auto;margin-top: 0;position: fixed;top: 999px;z-index: 99999;display: none;">
-        <div id="printMOrder" class="printMOrder">
-          <el-card class="box-card" v-for="(item, i) in checkDataList" :key="i" style="font-size: 0.16cm !important;page-break-after: always;color: #000;box-shadow: none;margin: 0 !important;padding: 0 !important;">
+        <div id="printMOrder" class="printMOrder" ref="printMOrder">
+          <el-card class="box-card" v-for="(item, i) in checkDataList" :key="i" style="font-size: 0.20cm !important;page-break-after: always;color: #000;box-shadow: none;margin: 0 !important;padding: 0 !important;">
             <div style="display: flex;">
               <div>
                 <el-col :span="10" :offset="2">
                   <vueQr :text="JSON.stringify(item.sampleCode)" :size="60" :margin="2"></vueQr>
                 </el-col>
               </div>
-              <div style="margin-left: 0.32cm;line-height: 0.21cm;">
+              <div style="margin-left: 0.32cm;line-height: 0.22cm;">
                 <el-row>
-                  <el-col  style="font-size: 0.16cm;"><span>鏍峰搧缂栧彿:&nbsp; </span>{{ item.sampleCode }}</el-col>
+                  <el-col  style="font-size: 0.20cm;width: 4cm;" class="single-line-ellipsis"><span>鏍峰搧缂栧彿:&nbsp; </span>{{ item.sampleCode }}</el-col>
                 </el-row>
-                <el-row style="font-size: 0.16cm;">
+                <el-row style="font-size: 0.20cm;">
                   <el-col><span>濮旀墭鍗曞彿:&nbsp; </span>{{ item.code }}</el-col>
                 </el-row>
-                <el-row style="font-size: 0.16cm;">
+                <el-row style="font-size: 0.20cm;">
                   <el-col><span>瑙勬牸鍨嬪彿:&nbsp; </span>{{ item.model }}</el-col>
                 </el-row>
-                <el-row style="font-size: 0.16cm;">
-                  <el-col ><span>鏍峰搧鍚嶇О:&nbsp; </span>{{ item.sampleName }}</el-col>
+                <el-row style="font-size: 0.20cm;">
+                  <el-col ><span>鏍峰搧鍚嶇О:&nbsp; </span>{{ item.sample }}</el-col>
                 </el-row>
-                <el-row style="font-size: 0.16cm;width: 5.6cm;">
+                <el-row style="font-size: 0.20cm;width: 4cm;">
                   <el-col class="ellipsis-multiline"><span>妫�娴嬮」鐩�:&nbsp; </span>{{ item.item }}</el-col>
                 </el-row>
-                <el-row style="margin-top: 0.01cm;font-size: 0.16cm;">
+                <el-row style="margin-top: 0.01cm;font-size: 0.20cm;">
                   <el-col  style="display: flex;align-items: center;"><span>鏍峰搧鐘舵��:&nbsp;
                   </span>
                     <span style="white-space: nowrap;"><span v-if="item.insState==0">鈭�</span><span class="scor" v-if="item.insState!=0"></span>寰呮
@@ -818,7 +818,7 @@
               targetStyles:['*'],
               style: `@page {
                 margin:0;
-                size: 360px 175px collapse;
+                size: 400px 75px collapse;
                 margin-top:3px;
                 &:first-of-type{
                   margin-top:0 !important;
@@ -828,13 +828,13 @@
                 zoom:100%;
               }
               @media print{
-                width: 360px;
-                height: 175px;
+                width: 400px;
+                height: 75px;
                 margin:0;
               }`,
               onPrintDialogClose: this.erexcel=false,
               targetStyles: ["*"], // 浣跨敤dom鐨勬墍鏈夋牱寮忥紝寰堥噸瑕�
-              font_size: '0.16cm',
+              font_size: '0.20cm',
         });
       },
       print(){
diff --git a/src/main.js b/src/main.js
index ddc5532..02eed56 100644
--- a/src/main.js
+++ b/src/main.js
@@ -20,14 +20,14 @@
 //鏈湴
 // Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80";
 // const javaApi = 'http://127.0.0.1:8001';
-const javaApi = 'http://192.168.92.249:8001';
+// const javaApi = 'http://192.168.92.2:8001';
 //浜�
 // Vue.prototype.LOCATIONVUE = "http://114.132.189.42:8080";
 // const javaApi = 'http://114.132.189.42:1234';
 
 // //妫�娴嬩腑蹇冩寮忓簱
 // Vue.prototype.LOCATIONVUE = "http://10.1.200.86:8080";
-// const javaApi = 'http://10.1.200.86:8001';
+const javaApi = 'http://10.1.200.86:8001';
 
 //瑁呭鐢电紗娴嬭瘯搴�
 // Vue.prototype.LOCATIONVUE = "http://10.16.173.59";
diff --git a/src/view/index.vue b/src/view/index.vue
index 38dc5a4..41f2471 100644
--- a/src/view/index.vue
+++ b/src/view/index.vue
@@ -394,6 +394,7 @@
       </span>
     </el-dialog>
     <notice ref="notice" @goNoticeDetail="checkForUnreadData()" />
+    <timer></timer>
 	</div>
 </template>
 
@@ -411,9 +412,10 @@
 	import menus from '../../static/js/menu.js'
 	import nullFace from '../view/404.vue'
   import notice from './notice.vue'
+  import timer from './timer.vue';
 	comObj['nullFace'] = nullFace
 	export default {
-		components: {...comObj,notice},
+		components: {...comObj,notice,timer},
 		data() {
 			return {
 				userName: "value",
diff --git a/src/view/timer.vue b/src/view/timer.vue
new file mode 100644
index 0000000..a037a4b
--- /dev/null
+++ b/src/view/timer.vue
@@ -0,0 +1,71 @@
+<template>
+  <div>
+    <el-dialog
+    title="鎻愮ず"
+    :visible.sync="dialogVisible"
+    width="30%"
+    :before-close="handleClose">
+      <span>杩欐槸涓�娈典俊鎭�</span>
+      <span slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="dialogVisible = false">纭� 瀹�</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  data(){
+    return{
+      timer:null,
+      closeTimeout:null,
+      dialogVisible:false,
+    }
+  },
+  mounted() {
+    this.startScheduler();
+  },
+  methods: {
+    startScheduler() {
+      this.checkTime();
+      // 姣忓垎閽熸鏌ヤ竴娆�
+      this.timer = setInterval(this.checkTime, 60 * 1000);
+    },
+    checkTime() {
+      const now = new Date();
+      const hours = now.getHours();
+      const minutes = now.getMinutes();
+
+      if (hours === 22 && minutes === 0) {
+        this.performTask();
+        // 璁剧疆20鍒嗛挓鍚庢彁绀哄叧闂�
+        this.closeTimeout = setTimeout(() => {
+          this.promptToClose();
+        }, 20 * 60 * 1000); // 20鍒嗛挓
+      }
+    },
+    performTask() {
+      // 鍦ㄨ繖閲屾墽琛屼綘鎯宠鐨勫畾鏃朵换鍔�
+      console.log("浠诲姟鎵ц浜嗭紒");
+      // 杩欓噷鍙互瑙﹀彂涓�涓� Vuex 鍔ㄤ綔銆佸彂璧蜂竴涓� HTTP 璇锋眰锛屾垨鑰呭叾浠栨搷浣�
+    },
+    promptToClose() {
+      // 鎻愮ず鐢ㄦ埛鍏抽棴
+      alert("璇疯寰楀湪20鍒嗛挓鍚庡叧闂换鍔★紒");
+    }
+  },
+  beforeDestroy() {
+    // 缁勪欢閿�姣佹椂娓呴櫎瀹氭椂鍣�
+    if (this.timer) {
+      clearInterval(this.timer);
+    }
+    if (this.closeTimeout) {
+      clearTimeout(this.closeTimeout);
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

--
Gitblit v1.9.3