Bladeren bron

时间修改

zouling 1 maand geleden
bovenliggende
commit
6c225c4b6f

+ 1 - 0
gongchangdaping/public/index.html

@@ -5,6 +5,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel="icon" href="<%= BASE_URL %>logo.png">
+	<title>鹏威</title>
 	<!-- <script src="../jquery-1.7.1.min.js"></script>
 	
 	<script src="./demo.js"></script> -->

BIN
gongchangdaping/public/logos.png


+ 9 - 4
gongchangdaping/src/views/controlRoom.vue

@@ -32,19 +32,24 @@ export default {
   data() {
     return {
 		time:'',
-		boxlist:[{tit:'三楼涂布车间'},{tit:'三楼烤箱'},{tit:'三楼一放南侧'},{tit:'三楼上胶间'},{tit:'三楼蓄料架'},{tit:'三楼一放北侧'},{tit:'三楼二放'},{tit:'三楼二放南侧'},{tit:'三楼涂布车间南侧走道'},]
+		boxlist:[{tit:'三楼涂布车间'},{tit:'三楼烤箱'},{tit:'三楼一放南侧'},{tit:'三楼上胶间'},{tit:'三楼蓄料架'},{tit:'三楼一放北侧'},{tit:'三楼二放'},{tit:'三楼二放南侧'},{tit:'三楼涂布车间南侧走道'},],
+		timer:null,
 	};
   },
  
   mounted(){
 	  this.refreshTime()
+	  this.timer = setInterval(this.refreshTime, 1000);
   },
   watch:{
 	 
   },
-  beforeDestroy() {
-   
-  },
+ beforeDestroy() {
+ 	if (this.timer) {
+ 	  clearInterval(this.timer);
+ 	  this.timer = null;
+ 	}
+ },
   methods:{
 	refreshTime() {
 	  this.time = new Date().toLocaleString('zh-CN', {

+ 27 - 10
gongchangdaping/src/views/home.vue

@@ -14,14 +14,14 @@
 		<img src="@/assets/images/photo/pic_zljc_bt_ssjc.png" alt="" style="margin-bottom: 17px;">
 		<div class='flexw'>
 			<div class="shishi_ong">
-				<p><span>1#FCCL覆铜压合机</span> <span>2025-05-09 11:37:31</span></p>
+				<p><span>1#FCCL覆铜压合机</span> <span>{{time}}</span></p>
 				<div>
 					<img src="@/assets/images/photo/pic_ssjc_t1.png" alt="" style="width: 100%;height: 317px;">
 				</div>
 				<p class="tit"><span>检测中</span> </p>
 			</div>
 			<div class="shishi_ong">
-				<p><span>1#FCCL覆铜压合机</span> <span>2025-05-09 11:37:31</span></p>
+				<p><span>1#FCCL覆铜压合机</span> <span>{{time}}</span></p>
 				<div>
 					<img src="@/assets/images/photo/pic_ssjc_t2.png" alt="" class="tjbg">
 				</div>
@@ -96,29 +96,46 @@ export default {
 		dataListc: [
 			{xh: '1',kh: '1#FCCL覆铜压合机',nb: 'GD250517A103 ',sl: '155m',wcl:"黑点",zt: 'NG',time:'10:15:54'},
 			{xh: '2',kh: '2#FCCL覆铜压合机',nb: 'GD250517A204 ',sl: '149m',wcl:"黑点",zt: 'OK',time:'10:35:14'},
-			{xh: '3',kh: '2#FCCL覆铜 压合机',nb: 'GD250517A206 ',sl: '29m',wcl:"钱方云",zt: 'NG',time:'11:25:51'},
-			{xh: '4',kh: '2#高精密烤箱',nb: 'GD250517A107 ',sl: '37m',wcl:"杂质",zt: 'NG',time:'11:37:31'},
+			{xh: '3',kh: '2#FCCL覆铜 压合机',nb: 'GD250517A206 ',sl: '29m',wcl:"杂质",zt: 'NG',time:'11:25:51'},
+			{xh: '4',kh: '2#高精密烤箱',nb: 'GD250517A107 ',sl: '37m',wcl:"色差",zt: 'NG',time:'11:37:31'},
 			{xh: '1',kh: '1#FCCL覆铜压合机',nb: 'GD250517A207 ',sl: '50m',wcl:"黑点",zt: 'OK',time:'11:40:21'},
-			{xh: '3',kh: '3#高精密烤箱',nb: 'GD250517A109 ',sl: '105m',wcl:"色差 ",zt: 'NG',time:'11:42:01'},
+			{xh: '3',kh: '3#高精密烤箱',nb: 'GD250517A109 ',sl: '105m',wcl:"杂质 ",zt: 'NG',time:'11:42:01'},
 		],
 		visibleRowsc:4,
 		columnc:[{label:'异常图片',prop:'xh',width:"10%",type:'img'},{label:'机台号',prop:'kh',width:"25%"},{label:'卷号/时间',prop:'nb',width:"15%",type:'hh'},{label:'异常位置',prop:'sl',width:"10%"},{label:'异常类型',prop:'wcl',width:"10%"},{label:'OK/NG',prop:'zt',width:"15%"}],
 		hbarDataa:{data:['皱痕','刮痕','缺胶','拉线','黑点','杂质','色差'],bara:[0,0,1,0,2,1,1],},
 		hbarDatab:{data:['皱痕','刮痕','缺胶','拉线','黑点','杂质','色差'],bara:[2,3,0,0,1,4,1],},
+		time:'',
+		timer:null,
 	};
   },
  
   mounted(){
-	  
+	  this.refreshTime()
+	  this.timer = setInterval(this.refreshTime, 1000);
   },
   watch:{
 	 
   },
-  beforeDestroy() {
-   
-  },
+ beforeDestroy() {
+ 	if (this.timer) {
+ 	  clearInterval(this.timer);
+ 	  this.timer = null;
+ 	}
+ },
   methods:{
-	
+	refreshTime() {
+	  this.time = new Date().toLocaleString('zh-CN', {
+	    year: 'numeric',
+	    hour12: false,
+	    month: '2-digit',
+	    day: '2-digit',
+	    hour: 'numeric',
+	    minute: 'numeric',
+	    second: 'numeric',
+	    // weekday: 'long',
+	  }).replace(/\//g, '-');
+	},
   }
 };
 </script>