From d9095e14919aa04a98447734fbe73d7360bf7f20 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 01 九月 2025 09:02:16 +0800
Subject: [PATCH] 1.密码强校验
---
src/views/business/inspectionTask/inspection.vue | 118 ++++++++++++++++++-----------------------------------------
1 files changed, 36 insertions(+), 82 deletions(-)
diff --git a/src/views/business/inspectionTask/inspection.vue b/src/views/business/inspectionTask/inspection.vue
index d32723c..d750b75 100644
--- a/src/views/business/inspectionTask/inspection.vue
+++ b/src/views/business/inspectionTask/inspection.vue
@@ -406,24 +406,24 @@
<el-button :loading="submitLoading" type="primary" @click="submit()">纭� 瀹�</el-button>
</span>
</el-dialog>
- <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false"
- :visible.sync="dataGetDia" title="鏁版嵁閲囬泦" width="80%">
- <div>
- <table border="1" cellpadding="10" class="thermal-table">
- <tr>
- <td style="width: 120px">妫�楠岄」鍒嗙被</td>
- <td style="width: 120px">妫�楠岄」</td>
- <td style="width: 120px">妫�楠屽瓙椤�</td>
- <td>鏁伴噰鏁版嵁</td>
- </tr>
- <template v-for="(item, index) in getData">
+ <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false"
+ :visible.sync="dataGetDia" title="鏁版嵁閲囬泦" width="80%">
+ <div>
+ <table border="1" cellpadding="10" class="thermal-table">
<tr>
- <td :rowspan="item.child.length">{{ item.sortName }}</td>
- <td :rowspan="item.child.length">{{ item.faName }}</td>
- <td>{{ item.child[0].name }}</td>
- <td style="text-align: left">
- <!-- 娣诲姞瀹瑰櫒 div -->
- <div class="data-collection-items">
+ <td style="width: 120px">妫�楠岄」鍒嗙被</td>
+ <td style="width: 120px">妫�楠岄」</td>
+ <td style="width: 120px">妫�楠屽瓙椤�</td>
+ <td>鏁伴噰鏁版嵁</td>
+ </tr>
+ <template v-for="(item, index) in getData">
+ <tr>
+ <td :rowspan="item.child.length">{{ item.sortName }}</td>
+ <td :rowspan="item.child.length">{{ item.faName }}</td>
+ <td>{{ item.child[0].name }}</td>
+ <td style="text-align: left">
+ <!-- 娣诲姞瀹瑰櫒 div -->
+ <div class="data-collection-items">
<el-select v-if="item.child[0].isShowSelect" v-model="item.child[0].getDataIndex1"
:multiple-limit="item.child[0].maxNum" clearable filterable multiple placeholder="璇烽�夋嫨"
@change="setData(item)">
@@ -526,7 +526,6 @@
:purchaseDialog="purchaseDialog" @resetPurchaseDialog="resetPurchaseDialog"></purchase-verification>
<!--鏌ョ湅宸ユ椂寮规-->
<viewManHourDia ref="viewManHourDia" @submit="openAddVerifyDia"></viewManHourDia>
- <button @click="sss">杩炴帴涓插彛</button>
</div>
</template>
@@ -667,18 +666,10 @@
{
name: "1285nm~1330nm",
arr: [12, 13, 14, 15],
- // 鍒濆鍖� getDataIndex1 涓烘暟缁�
- getDataIndex1: [],
- isShowSelect: false,
- maxNum: 5
},
{
name: "1525nm~1575nm",
arr: [12, 13, 14, 15],
- // 鍒濆鍖� getDataIndex1 涓烘暟缁�
- getDataIndex1: [],
- isShowSelect: false,
- maxNum: 5
},
],
},
@@ -688,10 +679,6 @@
{
name: "鎴嚦娉㈤暱",
arr: [12, 13, 14, 15],
- // 鍒濆鍖� getDataIndex1 涓烘暟缁�
- getDataIndex1: [],
- isShowSelect: false,
- maxNum: 5
},
],
},
@@ -824,7 +811,6 @@
this.startWorker();
// this.getList0() // 浠诲姟鍒囨崲
this.scrollInit();
- disconnect()
},
activated() {
this.getTypeDicts(); // 鑾峰彇绱ф�ョ▼搴︿笅鎷夋閫夐」
@@ -912,7 +898,7 @@
},
methods: {
sss() {
- console.log(this.$store.state.weightList) //
+ console.log(this.$store.state.weightList) //
},
// 鏂囦欢绠$悊--寮�濮�
getList() {
@@ -1152,17 +1138,24 @@
getDataAcquisitionDevice() {
(async () => {
try {
- // 妫�鏌ユ槸鍚︽敮鎸� Web Serial API
- if ('serial' in navigator) {
- // 璇锋眰鍙敤涓插彛
- const ports = await navigator.serial.getPorts();
- if (ports.length > 0) {
- await connect();
+ // 妫�鏌ラ〉闈腑妫�娴嬮」鏄惁鍖呭惈瀵嗗害
+ const hasDensityItem = this.currentSample.insProduct.some(item => {
+ // 鍋囪瀵嗗害鐩稿叧鐨勬娴嬮」鍚嶇О鍖呭惈 "瀵嗗害" 鍏抽敭瀛楋紝鍙寜闇�淇敼
+ return item.inspectionItem && item.inspectionItem.includes('瀵嗗害');
+ });
+ if (hasDensityItem) {
+ // 妫�鏌ユ槸鍚︽敮鎸� Web Serial API
+ if ('serial' in navigator) {
+ // 璇锋眰鍙敤涓插彛
+ const ports = await navigator.serial.getPorts();
+ if (ports.length > 0) {
+ await connect();
+ } else {
+ console.log('娌℃湁鍙敤鐨勪覆鍙�');
+ }
} else {
- console.log('娌℃湁鍙敤鐨勪覆鍙�');
+ console.log('褰撳墠娴忚鍣ㄤ笉鏀寔 Web Serial API');
}
- } else {
- console.log('褰撳墠娴忚鍣ㄤ笉鏀寔 Web Serial API');
}
} catch (error) {
console.error('妫�娴嬩覆鍙f椂鍑洪敊:', error);
@@ -1194,41 +1187,6 @@
});
});
},
- // getDataAcquisitionDevice() {
- // if (this.isSerialConnected) {
- // connect();
- // }
- // // return
- // let itemIds = [];
- // this.currentSample.insProduct.forEach((item) => {
- // if (item.inspectionItemType === "1") {
- // itemIds.push(item.id);
- // }
- // });
- // const params = {
- // entrustCode: this.insOrder.entrustCode,
- // sampleCode: this.currentSample.sampleCode,
- // id: this.currentSample.id,
- // itemIds: itemIds,
- // };
- // this.dataAcquisitionLoading = true;
- // dataCollection(params).then((res) => {
- // this.dataAcquisitionLoading = false;
- // if (res.code != 200) {
- // return;
- // }
- // this.dataAcquisitionInfoNew = this.HaveJson(res.data);
- // // 瀵规暟閲囧洖鏉ョ殑鍊艰繘琛屽鐞�
- // this.handleDataAcquisition(res.data);
- // }).catch(err => {
- // this.dataAcquisitionLoading = false;
- // });
- // },
- // 鍋囪瀛樺湪涓�涓柟娉曠敤浜庢洿鏂颁覆鍙h繛鎺ョ姸鎬�
- // updateSerialConnectionStatus(status) {
- // this.isSerialConnected = status;
- // },
-
objectOrder(obj) {
let newkey = Object.keys(obj).sort();
let newObj = {};
@@ -1238,7 +1196,6 @@
return newObj;
},
handleDataAcquisition(data, noDialog) {
- console.log(data);
// 鏄惁鍙互缂栬緫鏁伴噰鏁版嵁
if (this.dataAcquisitionEidtAble) {
this.getDataType = 1;
@@ -1291,7 +1248,6 @@
};
}
let list = this.tableList[0].arr;
- console.log(this.tableList[0]);
// 寰幆椤甸潰鍒楄〃淇℃伅锛屽垽鏂暟閲囨暟鎹搴旈〉闈㈠垪琛ㄤ俊鎭殑妫�楠岄」鏄摢涓紝骞剁粰褰撳墠妫�楠岄」缁戝畾璁惧淇℃伅
list.forEach((item, index) => {
let num0 = 0;
@@ -1359,7 +1315,6 @@
}
};
let list = this.tableList[0].arr;
- console.log(this.tableList[0]);
let maxNum = 0;
list.forEach((item, index) => {
let num0 = 0;
@@ -1464,7 +1419,6 @@
} else {
// 濡傛灉閮戒笉瀛樺湪锛屽垯锛岃繘鍏ュ鐞嗘暟閲囩嚎绋嬮噷鍘诲鐞嗘暟鎹�
try {
- console.log(this.dataAcquisitionInfo);
// 鍚� Worker 鍙戦�佹秷鎭紝寮�濮嬪鐞嗛�昏緫
this.getDataIndexLoading = false;
this.dataGetDia = false;
@@ -3271,11 +3225,11 @@
.data-collection-items {
display: flex;
- flex-wrap: wrap;
+ flex-wrap: wrap;
}
.data-collection-items .el-select,
.data-collection-items .el-checkbox {
- flex-basis: 20% ;
+ flex-basis: 20% ;
box-sizing: border-box;
padding: 5px 2%;
}
--
Gitblit v1.9.3