diff --git a/package.json b/package.json index 384604f..c821996 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "pinia-plugin-persistedstate": "^3.2.0", "qrcodejs2-fixes": "^0.0.2", "qs": "^6.11.0", + "serialport": "^13.0.0", "sortablejs": "^1.15.0", "v-code-diff": "^1.8.0", "vue": "^3.4.23", diff --git a/src/views/SmartScreen/ReportScreen/index.vue b/src/views/SmartScreen/ReportScreen/index.vue index ccbe37a..9fd31a1 100644 --- a/src/views/SmartScreen/ReportScreen/index.vue +++ b/src/views/SmartScreen/ReportScreen/index.vue @@ -16,16 +16,16 @@
- +
-
工单数
-
{{ orderData.workorderQuantity }} 个
+
{{ orderTitleList[index] }}
+
{{ value }}
- +
@@ -99,17 +99,22 @@ import { getCurrentInstance } from 'vue' const { proxy } = getCurrentInstance() /// =================== 获取工单数据 ====================== import { getDigitalTurntable } from '@/api/smartScreen/ReportScreen/index.js' +const orderTitleList = ref(['今日工单数', '今日物料领用', '今日生产计划总数', '今日出货数量', '今天动用组数']) const orderData = ref({ - "workorderQuantity": 0, // 工单数量 - "finishedWorkorderQuantity": 0, // 已完成工单数量 - "unFinishedWorkorderQuantity": 0, // 未完成工单数量 - "productionPlanQuantity": 0, // 生产计划数量 - "productionFinishQuantity": 0, // 生产完成数量 - "groupQuantity": 0 // 组数量 + // 今日工单数 + "workorderQuantity": 0, + // 今日物料领用 + "materialRequisitionQuantity": 0, + // 今日生产计划总数 + "productionPlanQuantity": 0, + // 今日出货数量 + "shipmentQuantity": 0, + // 今天动用组数 + "groupQuantity": 0 }) function getData() { getDigitalTurntable().then((res) => { - console.log(res); + // console.log(res); orderData.value = res.data }) } diff --git a/src/views/qualityManagement/Config/QcDefectConfig.vue b/src/views/qualityManagement/Config/QcDefectConfig.vue new file mode 100644 index 0000000..7e5f4cf --- /dev/null +++ b/src/views/qualityManagement/Config/QcDefectConfig.vue @@ -0,0 +1,297 @@ + + + + diff --git a/src/views/qualityManagement/FQC/defectCollection.vue b/src/views/qualityManagement/FQC/defectCollection.vue new file mode 100644 index 0000000..e147ebe --- /dev/null +++ b/src/views/qualityManagement/FQC/defectCollection.vue @@ -0,0 +1,434 @@ + + + + diff --git a/src/views/qualityManagement/IPQC/QcDefectCollection.vue b/src/views/qualityManagement/IPQC/QcDefectCollection.vue new file mode 100644 index 0000000..4a9f8e8 --- /dev/null +++ b/src/views/qualityManagement/IPQC/QcDefectCollection.vue @@ -0,0 +1,614 @@ + + + + + + diff --git a/src/views/qualityManagement/IPQC/QcDefectCollection2.vue b/src/views/qualityManagement/IPQC/QcDefectCollection2.vue new file mode 100644 index 0000000..efc07b7 --- /dev/null +++ b/src/views/qualityManagement/IPQC/QcDefectCollection2.vue @@ -0,0 +1,612 @@ + + + + + + diff --git a/src/views/qualityManagement/IQC/claimant.vue b/src/views/qualityManagement/IQC/claimant.vue new file mode 100644 index 0000000..e34236b --- /dev/null +++ b/src/views/qualityManagement/IQC/claimant.vue @@ -0,0 +1,418 @@ + + + + + + diff --git a/src/views/qualityManagement/IQC/frmLoss.vue b/src/views/qualityManagement/IQC/frmLoss.vue new file mode 100644 index 0000000..c5500e1 --- /dev/null +++ b/src/views/qualityManagement/IQC/frmLoss.vue @@ -0,0 +1,419 @@ + + + + + + diff --git a/src/views/qualityManagement/dataAnalysis/finishedProductQualityAnalysis/index.vue b/src/views/qualityManagement/dataAnalysis/finishedProductQualityAnalysis/index.vue new file mode 100644 index 0000000..ed3a77c --- /dev/null +++ b/src/views/qualityManagement/dataAnalysis/finishedProductQualityAnalysis/index.vue @@ -0,0 +1,144 @@ + + + diff --git a/src/views/qualityManagement/workGreen.vue b/src/views/qualityManagement/workGreen.vue new file mode 100644 index 0000000..473494f --- /dev/null +++ b/src/views/qualityManagement/workGreen.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/src/views/touchScreen/main/index.vue b/src/views/touchScreen/main/index.vue index a4b6d88..fbc2ebe 100644 --- a/src/views/touchScreen/main/index.vue +++ b/src/views/touchScreen/main/index.vue @@ -10,6 +10,7 @@ @@ -29,6 +30,7 @@ + @@ -45,6 +47,7 @@ import kbTime from '../components/kbTime.vue' import Report from '../report/index.vue' +import Quality from '../quality/index.vue' const { proxy } = getCurrentInstance() // 返回主页面 const goBack = () => { @@ -144,9 +147,41 @@ import { useDisplay } from "vuetify"; const { mobile, name } = useDisplay(); onMounted(() => { + checkSerial() console.log('是否是移动设备', mobile.value); // false console.log('桌面大小', name.value); // false }); + + + +/// ================= 串口通讯 ================= +function checkSerial() { + if ("serial" in navigator) { + console.log(true); + } else { + console.log(false); + } +} +const port = ref(null) +const ports = ref([]) +async function doGetPort() { + try { + const portInfo = await navigator.serial.requestPort(); + port.value = await portInfo.open({ baudRate: 9600 }); + port.value.addEventListener('data', (event) => { + const decoder = new TextDecoder('utf-8'); + const data = decoder.decode(event.data); + console.log('接收到串口数据:', data); + }); + console.log('串口已打开'); + } catch (error) { + console.error('串口请求或打开失败:', error); + } +} + +/// ========================================== + + \ No newline at end of file