Browse Source

app开发

chen 2 năm trước cách đây
mục cha
commit
fe9cda291e
41 tập tin đã thay đổi với 600 bổ sung415 xóa
  1. 18 14
      .hbuilderx/launch.json
  2. 4 7
      main.js
  3. 18 2
      manifest.json
  4. 11 2
      pages.json
  5. 54 119
      pages/index/index1.vue
  6. 323 0
      pages/index/index2.vue
  7. 73 0
      pages/start/start.vue
  8. BIN
      static/cg.mp3
  9. BIN
      static/empty.jpg
  10. BIN
      static/python-3.12.1-amd64.exe
  11. BIN
      static/sb.mp3
  12. 6 2
      uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue
  13. 12 2
      uni_modules/uni-table/components/uni-tr/uni-tr.vue
  14. 2 2
      unpackage/cache/wgt/__UNI__12102E1/app-config-service.js
  15. 0 0
      unpackage/cache/wgt/__UNI__12102E1/app-service.js
  16. 0 0
      unpackage/cache/wgt/__UNI__12102E1/app-view.js
  17. 0 0
      unpackage/cache/wgt/__UNI__12102E1/manifest.json
  18. BIN
      unpackage/cache/wgt/__UNI__12102E1/static/cg.mp3
  19. BIN
      unpackage/cache/wgt/__UNI__12102E1/static/empty.jpg
  20. BIN
      unpackage/cache/wgt/__UNI__12102E1/static/python-3.12.1-amd64.exe
  21. BIN
      unpackage/cache/wgt/__UNI__12102E1/static/sb.mp3
  22. BIN
      unpackage/debug/android_debug.apk
  23. 2 2
      unpackage/dist/build/app-plus/app-config-service.js
  24. 0 0
      unpackage/dist/build/app-plus/app-service.js
  25. 0 0
      unpackage/dist/build/app-plus/app-view.js
  26. 0 0
      unpackage/dist/build/app-plus/manifest.json
  27. BIN
      unpackage/dist/build/app-plus/static/cg.mp3
  28. BIN
      unpackage/dist/build/app-plus/static/empty.jpg
  29. BIN
      unpackage/dist/build/app-plus/static/python-3.12.1-amd64.exe
  30. BIN
      unpackage/dist/build/app-plus/static/sb.mp3
  31. 2 2
      unpackage/dist/dev/app-plus/app-config-service.js
  32. 0 0
      unpackage/dist/dev/app-plus/app-service.js
  33. 75 261
      unpackage/dist/dev/app-plus/app-view.js
  34. 0 0
      unpackage/dist/dev/app-plus/manifest.json
  35. BIN
      unpackage/dist/dev/app-plus/static/cg.mp3
  36. BIN
      unpackage/dist/dev/app-plus/static/empty.jpg
  37. BIN
      unpackage/dist/dev/app-plus/static/python-3.12.1-amd64.exe
  38. BIN
      unpackage/dist/dev/app-plus/static/sb.mp3
  39. BIN
      unpackage/release/apk/__UNI__12102E1_0208220807.apk
  40. BIN
      unpackage/release/apk/__UNI__12102E1__20240108231655.apk
  41. BIN
      unpackage/release/apk/__UNI__12102E1__20240108233112.apk

+ 18 - 14
.hbuilderx/launch.json

@@ -1,16 +1,20 @@
-{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
-  // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
-    "version": "0.0",
-    "configurations": [{
-     	"app-plus" : 
-     	{
-     		"launchtype" : "local"
-     	},
-     	"default" : 
-     	{
-     		"launchtype" : "local"
-     	},
-     	"type" : "uniCloud"
-     }
+{
+    // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
+    // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
+    "version" : "0.0",
+    "configurations" : [
+        {
+            "app-plus" : {
+                "launchtype" : "local"
+            },
+            "default" : {
+                "launchtype" : "local"
+            },
+            "type" : "uniCloud"
+        },
+        {
+            "playground" : "custom",
+            "type" : "uni-app:app-android"
+        }
     ]
 }

+ 4 - 7
main.js

@@ -21,16 +21,13 @@ const api = {
 	},
 	wsHost: function() {
 		//WS地址
-		 // return "ws://172.26.71.120:40003";
-		 // return "http://172.26.71.13:40003";
-		  // return "wss://rnbdriver.fjhqsc.cn/admin:40003/ws/websocket/";
-		  return "ws://192.168.1.18/websocket/";
-		  // return "wss://ai.my-123.cn/websocket/";
+		  // return "ws://192.168.31.75/websocket/";
+		  return "wss://ai.my-123.cn/websocket/";
 	},
 	apiHost: function() {
 		//接口地址
-		return 'http://192.168.1.18/'
-		// return 'https://ai.my-123.cn/api/'
+		// return 'http://192.168.31.75/'
+		return 'https://ai.my-123.cn/api/'
 	},
 	
 	request: function(url, params, method,type,hideLoading) {

+ 18 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "数智化产线",
     "appid" : "__UNI__12102E1",
     "description" : "",
-    "versionName" : "1.0.1",
-    "versionCode" : 101,
+    "versionName" : "1.0.2",
+    "versionCode" : 102,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */
@@ -79,6 +79,22 @@
                     }
                 }
             }
+        },
+        "nativePlugins" : {
+            "kyzone-websocket" : {
+                "__plugin_info__" : {
+                    "name" : "Android  原生websocket插件",
+                    "description" : "Android  原生websocket插件",
+                    "platforms" : "Android",
+                    "url" : "https://ext.dcloud.net.cn/plugin?id=10772",
+                    "android_package_name" : "app.com.pad",
+                    "ios_bundle_id" : "",
+                    "isCloud" : true,
+                    "bought" : 1,
+                    "pid" : "10772",
+                    "parameters" : {}
+                }
+            }
         }
     },
     /* SDK配置 */

+ 11 - 2
pages.json

@@ -1,6 +1,15 @@
 {
 	"pages": [{
-		"path": "pages/index/index",
+		"path": "pages/start/start",
+		"style": {
+		}
+	},{
+		"path": "pages/index/index1",
+		"style": {
+			"navigationBarTitleText": "数智化产线AI视觉识别系统"
+		}
+	},{
+		"path": "pages/index/index2",
 		"style": {
 			"navigationBarTitleText": "数智化产线AI视觉识别系统"
 		}
@@ -8,7 +17,7 @@
 	"globalStyle": {
 		"navigationStyle": "custom",
 		"navigationBarTextStyle": "black",
-		"navigationBarTitleText": "uni-app",
+		"navigationBarTitleText": "数智化产线AI视觉识别系统",
 		"navigationBarBackgroundColor": "#F8F8F8",
 		"backgroundColor": "#F8F8F8",
 		"pageOrientation": "landscape",

+ 54 - 119
pages/index/index.vue → pages/index/index1.vue

@@ -1,4 +1,5 @@
 <template>
+	<!-- 产品下线 -->
 	<view class="container">
 		<uni-nav-bar  dark :fixed="true" shadow title="数智化产线AI视觉识别系统" backgroundColor="#007aff" color="#fff" height="60px">
 			<view class="nav-bar-view" style="">数智化产线AI视觉识别系统</view>
@@ -6,8 +7,11 @@
 
 		<view class="uni-ma-10 " style="text-align: center;font-size: 50rpx;">
 			设备({{eqSn}})
-			<uni-tag class="uni-ml-10" style="font-size: 40rpx;" size="normal" text="在线" v-if="isConnect" type="primary"></uni-tag>
-			<uni-tag class="uni-ml-10" style="font-size: 40rpx;" size="normal"  text="离线" v-else type="default"></uni-tag>
+			<uni-tag class="uni-ml-10" style="font-size: 40rpx;" size="normal" text="链接中" v-if="webSocketStatus==0" type="warning"></uni-tag>
+			<uni-tag class="uni-ml-10" style="font-size: 40rpx;" size="normal"  text="已连接" v-else-if="webSocketStatus==1" type="primary"></uni-tag>
+			<uni-tag class="uni-ml-10" style="font-size: 40rpx;" size="normal" text="重连中" v-else-if="webSocketStatus==2" type="success"></uni-tag>
+			<uni-tag class="uni-ml-10" style="font-size: 40rpx;" size="normal"  text="已断开" v-else-if="webSocketStatus==-1" type="error"></uni-tag>
+			<uni-tag class="uni-ml-10" style="font-size: 40rpx;" size="normal"  text="未知" v-else type="default"></uni-tag>
 		</view>
 		<uni-row class="demo-uni-row uni-ma-10">
 			<uni-col :span="16" class="">
@@ -30,7 +34,8 @@
 							<uni-th align="center">识别结果</uni-th>
 							<uni-th align="center">拍照时间</uni-th>
 						</uni-tr>
-						<uni-tr v-for="(item, index) in tableData" :key="index">
+						<uni-tr v-for="(item, index) in tableData" :key="index" @click-row="clickRow(item,index)">
+							<template @click="clickRow(item)">
 							<uni-td align="center">{{ item.qrCode }}</uni-td>
 							<!-- <uni-td align="center">
 								<view style="max-height: 60rpx;"><image style="width: 100rpx;height: 60rpx;":src="item.productImage"></image></view>
@@ -41,6 +46,7 @@
 							</uni-td>
 							<uni-td align="center">{{ item.message }}</uni-td>
 							<uni-td align="center">{{ item.createTime }}</uni-td>
+							</template>
 						</uni-tr>
 					</uni-table>
 					<view class="uni-pagination-box"><uni-pagination show-icon :page-size="size" :current="current"
@@ -51,7 +57,7 @@
 		
 		<!-- 提示信息弹窗 -->
 		<uni-popup ref="message" type="message">
-			<uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
+			<uni-popup-message :type="msgType" fontSizt="30px" :message="messageText" :duration="3000"></uni-popup-message>
 		</uni-popup>
 		
 		
@@ -63,6 +69,8 @@
 	var interVal //全局定义定时执行心跳监测定时器ID,用于清除定时器
 	var reconnectTimer //全局定义定时执行一次重连定时器ID,用于清除定时器
 
+	const websocketModule = uni.requireNativePlugin("kyzone-websocket");
+	
 	export default {
 		data() {
 			return {
@@ -79,6 +87,7 @@
 				imgUrl:'',//https://ai.my-123.cn/pic/product-line/upload/20231218/d0dde7a200584e6cdb2e2f02622b9948.jpg
 				msgType:'',
 				messageText:'',
+				webSocketStatus:0,
 			}
 		},
 		onLoad() {
@@ -86,126 +95,49 @@
 				let macAddress = that.api.getMacAddress()
 				that.api.setSn(macAddress)
 			}
-			this.webSocketConfig()
+			this.initWebSocket()
 			this.getData(1)
 		},
 		methods: {
-			//建立socekt链接
-			webSocketConfig() {
-				//清除心跳、重连定时器,停止心跳检测
-				clearTimeout(reconnectTimer)
-				clearInterval(interVal)
+			initWebSocket(){
 				var that = this
-				var socketOpen = false;
-				uni.closeSocket() //socketTaskChat
-				console.log(that.api.wsHost() + that.eqSn)
-				//创建连接
-				socketTaskChat = uni.connectSocket({
-					url: that.api.wsHost() + that.eqSn,
-					data() {
-						return {};
-					},
-					header: {
-						'content-type': 'application/json',
-					},
-					method: 'GET',
-					success: res => {
-						console.log("socket链接成功")
-					},
-					fail: () => {
-						that.$refs.uToast.showToast(1, "WebSocket连接打开失败")
-					},
-					complete: () => {
-						console.log("complete")
-					}
-				});
-				socketTaskChat.onError(function(res) {
-					uni.showToast({
-						title: '连接超时,请耐心等候',
-						duration: 4000,
-						icon: 'none',
-						mask: true
-					})
-					//心跳监测
-					that.handleHeart()
-				});
-				socketTaskChat.onClose(function(res) {
-					console.log("onClose")
-					that.isConnect = false
-					that.handleHeart()
-				});
-				socketTaskChat.onOpen(function(res) {
-					// clearInterval(interVal)
-					console.log("onOpen")
-					socketOpen = true;
-					that.isConnect = true
-					//停止心跳检测
-					clearTimeout(reconnectTimer)
-					clearInterval(interVal)
-
-				});
-				socketTaskChat.onMessage(function(res) {
-					console.info("onMessage", res)
-					const data = JSON.parse(res.data);
-					that.imgUrl = data.productImage
-					that.msgType = data.status==1?'success':'error'
-					that.messageText = data.message
-					that.$refs.message.open()
-					that.getData(1)
-					// if(data.tips == '未开播')
-					// {
-					//   that.$refs.uToast.showToast(1, "抖音未开播")
-					//   that.contentShow = "当前直播间未开播,确定关闭吗?"
-					//   that.showModal = true
-					// }
-					// else if(data.status == 1)
-					// {
-					// 	//接收到的消息处理区域
-					// 	//xxxxxxx
-					// 	//xxxxxxx
-					// }
-				});
-			},
-			//心跳检测
-			handleHeart() {
-				var that = this
-				console.log("心跳监测")
-				//设置定时开始心跳检测
-				interVal = setInterval(function() {
-					//发送消息,验证是否存在心跳
-					that.handleSend()
-				}, 3 * 1000)
-			},
-			//发送消息
-			handleSend() {
-				var that = this
-				var data = {
-					state: 1,
-					method: 'heartbeat'
-				}
-				socketTaskChat.send({
-					data: data,
-					success(res) {},
-					fail(res) {
-						console.log('发送失败')
-						//重连socekt
-						that.reconnect()
+				let url = that.api.wsHost() + that.eqSn +"_"+ new Date().getTime()
+				websocketModule.connect({
+				     url: url,
+				     reconnect: true, // 是否重连
+					 headers:[],
+				})
+				plus.globalEvent.addEventListener('onConnectState', function(e) {
+					debugger
+					const data = e.data;
+					that.webSocketStatus = data
+				})
+				plus.globalEvent.addEventListener('onErrorMsg', function(e) {
+					debugger
+					console.log("错误信息:" + e.data);
+				})
+				plus.globalEvent.addEventListener('onMessage', function(e) {
+					debugger
+					const data = JSON.parse(e.data);
+					console.log("监听接收的信息:" + data);
+					
+					if(data.eqSn==that.eqSn){
+						that.imgUrl = data.productImage
+						that.msgType = data.status==1?'success':'error'
+						that.messageText = data.message
+						that.$refs.message.open()
+						that.getData(1)
+						
+						let innerAudioContext = uni.createInnerAudioContext();
+						innerAudioContext.src = data.status==1?'../../static/cg.mp3':'../../static/sb.mp3';
+						innerAudioContext.play();
+						innerAudioContext.onPause(function() {
+						   uni.$console.info('end');      
+						  innerAudioContext.destroy();//音频播放停止后,就销毁实例  
+						});
 					}
-				});
-			},
-			// 重新连接socket
-			reconnect() {
-				var that = this
-				// 停止发送心跳
-				clearTimeout(reconnectTimer)
-				clearInterval(interVal)
-				//定时执行一次websocket链接方法,进行socket重连
-				reconnectTimer = setTimeout(() => {
-					//开启socket链接
-					that.webSocketConfig()
-				}, 3 * 1000)
+				})
 			},
-
 			// 分页触发
 			change(e) {
 				this.getData(e.current)
@@ -218,7 +150,7 @@
 					params = {
 						current: pageCurrent,
 						size: that.size,
-						eqSn: that.eqSn
+						eqSn_equal: that.eqSn
 					}
 				that.api.request(url, params, "get").then((res) => {
 					console.log(res)
@@ -240,6 +172,9 @@
 				// 	}
 				// })
 			},
+			clickRow(item,index){
+				this.imgUrl = item.productImage
+			}
 		}
 	}
 </script>

+ 323 - 0
pages/index/index2.vue

@@ -0,0 +1,323 @@
+<template>
+	<!-- 商品点检 -->
+	<view class="container">
+		<uni-nav-bar  dark :fixed="true" shadow title="数智化产线AI视觉识别系统" backgroundColor="#007aff" color="#fff" height="60px">
+			<view class="nav-bar-view" style="">数智化产线AI视觉识别系统</view>
+		</uni-nav-bar>
+
+		<view class="uni-ma-10 " style="text-align: center;font-size: 50rpx;">
+			设备({{eqSn}})
+			<uni-tag class="uni-ml-10" style="font-size: 40rpx;" size="normal" text="链接中" v-if="webSocketStatus==0" type="warning"></uni-tag>
+			<uni-tag class="uni-ml-10" style="font-size: 40rpx;" size="normal"  text="已连接" v-else-if="webSocketStatus==1" type="primary"></uni-tag>
+			<uni-tag class="uni-ml-10" style="font-size: 40rpx;" size="normal" text="重连中" v-else-if="webSocketStatus==2" type="success"></uni-tag>
+			<uni-tag class="uni-ml-10" style="font-size: 40rpx;" size="normal"  text="已断开" v-else-if="webSocketStatus==-1" type="error"></uni-tag>
+			<uni-tag class="uni-ml-10" style="font-size: 40rpx;" size="normal"  text="未知" v-else type="default"></uni-tag>
+		</view>
+		<uni-row class="demo-uni-row uni-ma-10">
+			<uni-col :span="16" class="">
+				<view class="img-card uni-mx-5">
+					<image style="width: 100%;" mode="widthFix"  v-if="imgUrl"
+						:src="imgUrl">
+					</image>
+					<view class="empty" v-else>
+						<uni-icons type="image" size="80"></uni-icons>
+					</view>
+				</view>
+			</uni-col>
+			<uni-col :span="8">
+				<view class="uni-mr-5">
+					<uni-table ref="table" :loading="loading" border stripe emptyText="暂无更多数据">
+						<uni-tr>
+							<uni-th width="150" align="center">商品二维码</uni-th>
+							<!-- <uni-th width="100" align="center">图片</uni-th> -->
+							<uni-th width="50">状态</uni-th>
+							<uni-th align="center">识别结果</uni-th>
+							<uni-th align="center">拍照时间</uni-th>
+						</uni-tr>
+						<uni-tr v-for="(item, index) in tableData" :key="index" @click-row="clickRow(item)">
+							<template >
+							<uni-td align="center">{{ item.goodsCode }}</uni-td>
+							<!-- <uni-td align="center">
+								<view style="max-height: 60rpx;"><image style="width: 100rpx;height: 60rpx;":src="item.goodsImage"></image></view>
+							</uni-td> -->
+							<uni-td align="center">
+								<view :class="item.status==1?'uni-success':item.status==2?'uni-error':'uni-warning'">{{ item.status==1?'成功':item.status==2?'失败':'修正成功' }}</view>
+							</uni-td>
+							<uni-td align="center">{{ item.ocrResult }}</uni-td>
+							<uni-td align="center">{{ item.createTime }}</uni-td>
+							</template>
+						</uni-tr>
+					</uni-table>
+					<view class="uni-pagination-box"><uni-pagination show-icon :page-size="size" :current="current"
+							:total="total" @change="change" /></view>
+				</view>
+			</uni-col>
+		</uni-row>
+		
+		<!-- 提示信息弹窗 -->
+		<uni-popup ref="message" type="message">
+			<uni-popup-message :type="msgType" fontSizt="30px" :message="messageText" :duration="3000"></uni-popup-message>
+		</uni-popup>
+		
+		<!-- 普通弹窗 -->
+		<uni-popup ref="popup" background-color="#fff"  :mask-click="false">
+			<view class="popup-header">物料详情</view>
+			<view class="popup-content" >
+				<uni-forms ref="detailsForm" :modelValue="details">
+					<uni-forms-item v-for="(item,index) in details" :key="item.id" :label="item.materialName" required :rules="[{'required': true,errorMessage: item.materialName+'必填'}]" :name="index+'.materialCode'">
+						<view class="form-item">
+							<uni-easyinput v-model="details[index].materialCode" :disabled="true" :placeholder="'请输入或扫描'+item.materialName+'的条码' "@blur="(e)=>detailsForm.id=e.detail.value" />
+						</view>
+					</uni-forms-item>
+				</uni-forms>
+				<input class="uni-easyinput__content-input" ref="materialCode" v-model="materialCode"  :focus="true" :placeholder="'请输入或扫描物料条码' " @input="materialCodeInput"/>
+				<view class="button-group">
+					<button type="default" size="mini" @click="$refs.popup.close()">返回</button>
+					<button type="primary" size="mini" @click="submit('detailsForm')">提交</button>
+				</view>
+			</view>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+	const websocketModule = uni.requireNativePlugin("kyzone-websocket");
+	export default {
+		data() {
+			return {
+				isConnect:false,
+				tableData: [],
+				// 每页数据量
+				size: 10,
+				// 当前页
+				current: 1,
+				// 数据总量
+				total: 0,
+				loading: false,
+				eqSn: this.api.getSn(),
+				imgUrl:'',//https://ai.my-123.cn/pic/product-line/upload/20231218/d0dde7a200584e6cdb2e2f02622b9948.jpg
+				msgType:'',
+				messageText:'',
+				webSocketStatus:0,
+				detailsForm:{},
+				details:[],
+				materialCode:'',
+			}
+		},
+		onLoad() {
+			if(!this.eqSn){
+				let macAddress = that.api.getMacAddress()
+				that.api.setSn(macAddress)
+			}
+			// this.webSocketConfig()
+			this.getData(1)
+			this.initWebSocket()
+		},
+		onUnload() {
+		    // 页面销毁时执行的操作
+		    console.log('页面销毁,onUnload被触发');
+		    websocketModule.close()
+		},
+		methods: {
+			initWebSocket(){
+				websocketModule.close()
+				var that = this
+				let url = that.api.wsHost() + that.eqSn +"_"+ new Date().getTime()
+				websocketModule.connect({
+				     url: url,
+				     reconnect: true, // 是否重连
+					 headers:[],
+				})
+				plus.globalEvent.addEventListener('onConnectState', function(e) {
+					debugger
+					const data = e.data;
+					that.webSocketStatus = data
+				})
+				plus.globalEvent.addEventListener('onErrorMsg', function(e) {
+					debugger
+					console.log("错误信息:" + e.data);
+				})
+				plus.globalEvent.addEventListener('onMessage', function(e) {
+					debugger
+					e.data = e.data.replace(/\"id\": (\d+)/g,'"id":"$1"');
+					const data = JSON.parse(e.data);
+					console.log("监听接收的信息:" );
+					console.log(data);
+					
+					if(data.eqSn==that.eqSn){
+						that.imgUrl = data.goodsImage
+						that.msgType = data.status==1?'success':'error'
+						that.messageText = data.ocrResult
+						that.$refs.message.open()
+						that.getData(1)
+						if(data.status!=1){
+							that.clickRow(data)
+						}
+						
+						let innerAudioContext = uni.createInnerAudioContext();
+						innerAudioContext.src = data.status==1?'../../static/cg.mp3':'../../static/sb.mp3';
+						innerAudioContext.play();
+						innerAudioContext.onPause(function() {
+						   uni.$console.info('end');      
+						  innerAudioContext.destroy();//音频播放停止后,就销毁实例  
+						});
+					}
+				})
+			},
+			// 分页触发
+			change(e) {
+				this.getData(e.current)
+			},
+			// 获取数据
+			getData(pageCurrent, value = '') {
+				this.loading = true
+				let that = this,
+					url = "app/api/inspectionRecordsList",
+					params = {
+						current: pageCurrent,
+						size: that.size,
+						eqSn_equal: that.eqSn
+					}
+				that.api.request(url, params, "get").then((res) => {
+					that.tableData = res.records
+					that.total = res.total
+					that.loading = false
+				}).catch((res) => {
+					that.loading = false
+				})
+				// this.request({
+				// 	pageSize: this.pageSize,
+				// 	pageCurrent: pageCurrent,
+				// 	value: value,
+				// 	success: res => {
+				// 		// console.log('data', res);
+				// 		this.tableData = res.data
+				// 		this.total = res.total
+				// 		this.loading = false
+				// 	}
+				// })
+			},
+			clickRow(item){
+				let that = this
+				this.imgUrl = item.goodsImage
+				console.log(item)
+				if(item.status==2 && item.goodsId>0){
+					this.$refs.popup.open("center")
+					this.details=[];
+					that.api.request("app/api/getInspectionDetails", {inspectionRecordsId_equal:item.id}, "get").then((res) => {
+						that.details = res
+						console.log(res)
+					}).catch((res) => {
+						that.loading = false
+					})
+				}
+			},
+			submit(ref) {
+				let that = this;
+				this.$refs[ref].validate().then(res => {
+					console.log("123123")
+					that.api.request("app/api/editInspectionDetails",that.details, "post").then((res) => {
+						that.$refs.popup.close()
+						uni.showToast({
+							title: `修改成功`
+						})
+						that.getData(1)
+					}).catch((res) => {
+						that.loading = false
+					})
+				}).catch(err => {
+					console.log('err', err);
+				})
+			},
+			materialCodeInput(e){
+				let that = this;
+				let value = e.target.value;
+				this.$nextTick(()=>{
+					that.materialCode='';
+				})
+				let count = 0;
+				that.details.forEach(function(item, index) {
+					if(item.correctMaterialCode == value){
+						console.log(index)
+						if(!item.materialCode){
+							that.$nextTick(()=>{
+								that.details[index].materialCode = value
+							})
+							count++
+						}
+					}
+					if(item.materialCode){
+						count++
+					}
+				})
+				if(count >= that.details.length){
+					console.log(count)
+					that.$nextTick(()=>{
+						setTimeout(() => {
+							console.log("detailsForm")
+							that.submit('detailsForm')
+						}, 500)
+					})
+				}
+				return
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.container {
+		font-size: 14px;
+		line-height: 24px;
+	}
+
+	.uni-group {
+		display: flex;
+		align-items: center;
+	}
+	.img-card{
+		box-shadow: 0 0 5px 1px rgba(0,0,0,.08);
+		min-height: 1300rpx;
+		text-align: center;
+		.empty{
+			padding-top: 600rpx;
+		}
+	}
+	.nav-bar-view{
+		display: flex;
+		flex: 1;
+		flex-direction: row;
+		align-items: center;
+		justify-content: center;
+		font-size: 12px;
+		overflow: hidden;
+		font-size: 50rpx;
+		font-weight: bold;
+	}
+	.popup-header{
+		padding: 20rpx 20rpx;
+		font-size: 30rpx;
+		border-bottom: 2rpx #bcbcbc solid;
+	}
+	.popup-content{
+		margin: 100rpx;
+		.button-group{
+			margin-top: 15px;
+			display: flex;
+			justify-content: space-around;
+			button{
+				width: 200rpx;
+				padding: 10rpx 0;
+			}
+		}
+	}
+	.uni-easyinput__content-input {
+		color: #333;
+		line-height: 35px;
+		font-size: 14px;
+		height: 35px;
+		border: 1px solid $uni-border-1;
+		border-radius: 4px;
+		padding: 0 15px;
+	}
+</style>

+ 73 - 0
pages/start/start.vue

@@ -0,0 +1,73 @@
+<template>
+  <view class="pages">
+	  <view class="empty_item" v-if="show">
+		<image mode="widthFix" src="../../static/empty.jpg"></image>
+		<view class="error-text">设备SN:{{sn}}</view>
+		<view class="error-text">{{errorText}}</view>
+	  </view>
+  </view>
+</template>
+
+<script setup>
+  export default {
+    data(){
+      return {
+		  sn:this.api.getSn(),
+		  errorText:'系统异常',
+		  show:false,
+      }
+    },
+	onShow(){
+		this.getEquipmentInfo()
+	},
+    methods: {
+		// 获取数据
+		getEquipmentInfo() {
+			this.loading = true
+			let that = this,
+				url = "app/api/getEquipmentInfo",
+				params = {
+					eqSn_equal: this.sn
+				}
+			that.api.request(url, params, "get").then((res) => {
+				uni.redirectTo({
+					url:"/pages/index/index"+res.factory.type
+				})
+			
+			}).catch((res) => {
+				console.log(res)
+				this.show=true
+				if(res.data && res.data.msg){
+					that.errorText = res.data.msg
+				}
+			})
+			// this.request({
+			// 	pageSize: this.pageSize,
+			// 	pageCurrent: pageCurrent,
+			// 	value: value,
+			// 	success: res => {
+			// 		// console.log('data', res);
+			// 		this.tableData = res.data
+			// 		this.total = res.total
+			// 		this.loading = false
+			// 	}
+			// })
+		},
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+	.pages{
+		background: #fff;
+		text-align: center;
+		min-height: 100vh;
+		.empty_item{
+			padding-top: 10%;
+		}
+		.error-text{
+			font-size: 40rpx;
+			line-height: 80rpx;
+		}
+	}
+</style>

BIN
static/cg.mp3


BIN
static/empty.jpg


BIN
static/python-3.12.1-amd64.exe


BIN
static/sb.mp3


+ 6 - 2
uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue

@@ -2,7 +2,7 @@
 	<view class="uni-popup-message">
 		<view class="uni-popup-message__box fixforpc-width" :class="'uni-popup__'+type">
 			<slot>
-				<text class="uni-popup-message-text" :class="'uni-popup__'+type+'-text'">{{message}}</text>
+				<text class="uni-popup-message-text" :class="'uni-popup__'+type+'-text'" :style="{'font-size':fontSizt}">{{message}}</text>
 			</slot>
 		</view>
 	</view>
@@ -51,6 +51,10 @@
 			maskShow:{
 				type:Boolean,
 				default:false
+			},
+			fontSizt:{
+				type: String,
+				default:'14px'
 			}
 		},
 		data() {
@@ -82,7 +86,7 @@
 
 	.uni-popup-message__box {
 		background-color: #e1f3d8;
-		padding: 10px 15px;
+		padding: 20px 15px;
 		border-color: #eee;
 		border-style: solid;
 		border-width: 1px;

+ 12 - 2
uni_modules/uni-table/components/uni-tr/uni-tr.vue

@@ -1,6 +1,6 @@
 <template>
 	<!-- #ifdef H5 -->
-	<tr class="uni-table-tr">
+	<tr class="uni-table-tr" @click="clickRow">
 		<th v-if="selection === 'selection' && ishead" class="checkbox" :class="{ 'tr-table--border': border }">
 			<table-checkbox :checked="checked" :indeterminate="indeterminate" :disabled="disabled" @checkboxSelected="checkboxSelected"></table-checkbox>
 		</th>
@@ -9,7 +9,7 @@
 	</tr>
 	<!-- #endif -->
 	<!-- #ifndef H5 -->
-	<view class="uni-table-tr">
+	<view class="uni-table-tr" @click="clickRow">
 		<view v-if="selection === 'selection' " class="checkbox" :class="{ 'tr-table--border': border }">
 			<table-checkbox :checked="checked" :indeterminate="indeterminate" :disabled="disabled" @checkboxSelected="checkboxSelected"></table-checkbox>
 		</view>
@@ -98,6 +98,16 @@ export default {
 			this.checked = e.checked
 			this.root.check(rootData||this, e.checked,rootData? this.keyValue:null)
 		},
+		clickRow(e){
+			let index = this.root.trChildren.findIndex(i => i === this)
+			let rootData = this.root.data.find(v => v[this.root.rowKey] === this.keyValue)
+			this.$emit('click-row', {
+				detail: {
+					value: rootData,
+					index: index
+				}
+			})
+		},
 		change(e) {
 			this.root.trChildren.forEach(item => {
 				if (item === this) {

+ 2 - 2
unpackage/cache/wgt/__UNI__12102E1/app-config-service.js

@@ -1,8 +1,8 @@
 
 var isReady=false;var onReadyCallbacks=[];
 var isServiceReady=false;var onServiceReadyCallbacks=[];
-var __uniConfig = {"pages":["pages/index/index"],"window":{"navigationStyle":"custom","navigationBarTextStyle":"black","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8","pageOrientation":"landscape","background":"#efeff4"},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"数智化产线","compilerVersion":"3.99","entryPagePath":"pages/index/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
-var __uniRoutes = [{"path":"/pages/index/index","meta":{"isQuit":true},"window":{"navigationBarTitleText":"数智化产线AI视觉识别系统"}}];
+var __uniConfig = {"pages":["pages/start/start","pages/index/index1","pages/index/index2"],"window":{"navigationStyle":"custom","navigationBarTextStyle":"black","navigationBarTitleText":"数智化产线AI视觉识别系统","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8","pageOrientation":"landscape","background":"#efeff4"},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"数智化产线","compilerVersion":"3.99","entryPagePath":"pages/start/start","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
+var __uniRoutes = [{"path":"/pages/start/start","meta":{"isQuit":true},"window":{}},{"path":"/pages/index/index1","meta":{},"window":{"navigationBarTitleText":"数智化产线AI视觉识别系统"}},{"path":"/pages/index/index2","meta":{},"window":{"navigationBarTitleText":"数智化产线AI视觉识别系统"}}];
 __uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
 __uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
 service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}});

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
unpackage/cache/wgt/__UNI__12102E1/app-service.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
unpackage/cache/wgt/__UNI__12102E1/app-view.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
unpackage/cache/wgt/__UNI__12102E1/manifest.json


BIN
unpackage/cache/wgt/__UNI__12102E1/static/cg.mp3


BIN
unpackage/cache/wgt/__UNI__12102E1/static/empty.jpg


BIN
unpackage/cache/wgt/__UNI__12102E1/static/python-3.12.1-amd64.exe


BIN
unpackage/cache/wgt/__UNI__12102E1/static/sb.mp3


BIN
unpackage/debug/android_debug.apk


+ 2 - 2
unpackage/dist/build/app-plus/app-config-service.js

@@ -1,8 +1,8 @@
 
 var isReady=false;var onReadyCallbacks=[];
 var isServiceReady=false;var onServiceReadyCallbacks=[];
-var __uniConfig = {"pages":["pages/index/index"],"window":{"navigationStyle":"custom","navigationBarTextStyle":"black","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8","pageOrientation":"landscape","background":"#efeff4"},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"数智化产线","compilerVersion":"3.99","entryPagePath":"pages/index/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
-var __uniRoutes = [{"path":"/pages/index/index","meta":{"isQuit":true},"window":{"navigationBarTitleText":"数智化产线AI视觉识别系统"}}];
+var __uniConfig = {"pages":["pages/start/start","pages/index/index1","pages/index/index2"],"window":{"navigationStyle":"custom","navigationBarTextStyle":"black","navigationBarTitleText":"数智化产线AI视觉识别系统","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8","pageOrientation":"landscape","background":"#efeff4"},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"数智化产线","compilerVersion":"3.99","entryPagePath":"pages/start/start","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
+var __uniRoutes = [{"path":"/pages/start/start","meta":{"isQuit":true},"window":{}},{"path":"/pages/index/index1","meta":{},"window":{"navigationBarTitleText":"数智化产线AI视觉识别系统"}},{"path":"/pages/index/index2","meta":{},"window":{"navigationBarTitleText":"数智化产线AI视觉识别系统"}}];
 __uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
 __uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
 service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}});

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
unpackage/dist/build/app-plus/app-service.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
unpackage/dist/build/app-plus/app-view.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
unpackage/dist/build/app-plus/manifest.json


BIN
unpackage/dist/build/app-plus/static/cg.mp3


BIN
unpackage/dist/build/app-plus/static/empty.jpg


BIN
unpackage/dist/build/app-plus/static/python-3.12.1-amd64.exe


BIN
unpackage/dist/build/app-plus/static/sb.mp3


+ 2 - 2
unpackage/dist/dev/app-plus/app-config-service.js

@@ -1,8 +1,8 @@
 
 var isReady=false;var onReadyCallbacks=[];
 var isServiceReady=false;var onServiceReadyCallbacks=[];
-var __uniConfig = {"pages":["pages/index/index"],"window":{"navigationStyle":"custom","navigationBarTextStyle":"black","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8","pageOrientation":"landscape","background":"#efeff4"},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"数智化产线","compilerVersion":"3.99","entryPagePath":"pages/index/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
-var __uniRoutes = [{"path":"/pages/index/index","meta":{"isQuit":true},"window":{"navigationBarTitleText":"数智化产线AI视觉识别系统"}}];
+var __uniConfig = {"pages":["pages/start/start","pages/index/index1","pages/index/index2"],"window":{"navigationStyle":"custom","navigationBarTextStyle":"black","navigationBarTitleText":"数智化产线AI视觉识别系统","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8","pageOrientation":"landscape","background":"#efeff4"},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"数智化产线","compilerVersion":"3.99","entryPagePath":"pages/start/start","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
+var __uniRoutes = [{"path":"/pages/start/start","meta":{"isQuit":true},"window":{}},{"path":"/pages/index/index1","meta":{},"window":{"navigationBarTitleText":"数智化产线AI视觉识别系统"}},{"path":"/pages/index/index2","meta":{},"window":{"navigationBarTitleText":"数智化产线AI视觉识别系统"}}];
 __uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
 __uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
 service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}});

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
unpackage/dist/dev/app-plus/app-service.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 75 - 261
unpackage/dist/dev/app-plus/app-view.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
unpackage/dist/dev/app-plus/manifest.json


BIN
unpackage/dist/dev/app-plus/static/cg.mp3


BIN
unpackage/dist/dev/app-plus/static/empty.jpg


BIN
unpackage/dist/dev/app-plus/static/python-3.12.1-amd64.exe


BIN
unpackage/dist/dev/app-plus/static/sb.mp3


BIN
unpackage/release/apk/__UNI__12102E1_0208220807.apk


BIN
unpackage/release/apk/__UNI__12102E1__20240108231655.apk


BIN
unpackage/release/apk/__UNI__12102E1__20240108233112.apk


Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác