From da9c0b8c1b35edfa586f523692a6c27e8fb4d338 Mon Sep 17 00:00:00 2001
From: lxp <1928192722@qq.com>
Date: 星期一, 12 八月 2024 17:51:05 +0800
Subject: [PATCH] modified: src/components/do/b1-ins-order/fiberoptic-config.vue
---
src/components/do/b1-ins-order/fiberoptic-config.vue | 71 ++++++++++++++++++++++++++++++++---
1 files changed, 65 insertions(+), 6 deletions(-)
diff --git a/src/components/do/b1-ins-order/fiberoptic-config.vue b/src/components/do/b1-ins-order/fiberoptic-config.vue
index 5aece9d..85693df 100644
--- a/src/components/do/b1-ins-order/fiberoptic-config.vue
+++ b/src/components/do/b1-ins-order/fiberoptic-config.vue
@@ -809,14 +809,13 @@
})
console.log(this.bushing);
this.selectBushing = this.bushing
- this.addFiber()
+ this.addFiber(1)
// 榛樿鍕鹃��
setTimeout(() => {
// this.selectBushing.forEach(item =>{
// let rowToSelect = this.bushing.find(a => a.ident == item.ident)
// this.$refs.table0.toggleRowSelection(rowToSelect, true)
// })
-
this.fiberList.forEach(item =>{
this.$refs.table3.toggleRowSelection(item, true)
})
@@ -1070,7 +1069,7 @@
}
})
},
- addFiber() {
+ addFiber(isInspection) {
// 鏈�鏂�
let colors2 = []
if (this.packageInfo.num1 / this.colors.length > 1) {
@@ -1088,11 +1087,23 @@
if(this.multiFiberList.length != 0){
this.multiFiberList.forEach((a,index) => {
a.fiber = []
- for (var i = 0; i < parseInt(a.num); i++) {
+ console.log('****',a,index);
+
+ if(index > 0 && index < this.multiFiberList.length) {
+ if(this.multiFiberList[index].color == this.multiFiberList[index-1].color) {
+
+
+
+ console.log('****',this.multiFiberList[index-1].num);
+
+
+
+ for (var i = 0; i < parseInt(a.num); i++) {
let fiber = {
ident: this.fiberList.length + 1,
bushColor: a.color,
- color: colors2[(i+(parseInt(a.num)*index))>colors2.length?0:i+(parseInt(a.num)*index)*index].label,
+ // color: colors2[(i+(parseInt(a.num)*index))>colors2.length?0:i+(parseInt(a.num)*index)*index].label,
+ color: colors2[i+parseInt(this.multiFiberList[index-1].num)].label,
model: null,
noSplitModel: null,
standard: null,
@@ -1100,6 +1111,38 @@
productList: []
}
this.fiberList.push(fiber)
+ }
+ }else {
+ for (var i = 0; i < parseInt(a.num); i++) {
+ let fiber = {
+ ident: this.fiberList.length + 1,
+ bushColor: a.color,
+ // color: colors2[(i+(parseInt(a.num)*index))>colors2.length?0:i+(parseInt(a.num)*index)*index].label,
+ color: colors2[i].label,
+ model: null,
+ noSplitModel: null,
+ standard: null,
+ fibersIdent: a.ident,
+ productList: []
+ }
+ this.fiberList.push(fiber)
+ }
+ }
+ }else{
+ for (var i = 0; i < parseInt(a.num); i++) {
+ let fiber = {
+ ident: this.fiberList.length + 1,
+ bushColor: a.color,
+ // color: colors2[(i+(parseInt(a.num)*index))>colors2.length?0:i+(parseInt(a.num)*index)*index].label,
+ color: colors2[i].label,
+ model: null,
+ noSplitModel: null,
+ standard: null,
+ fibersIdent: a.ident,
+ productList: []
+ }
+ this.fiberList.push(fiber)
+ }
}
})
} else {
@@ -1136,7 +1179,22 @@
// 鏍规嵁濂楃鐨勬祴璇曢噺鐢熸垚瀵瑰簲鐨勬暟閲忕殑鍏夌氦鏁版嵁
this.selectBushing.forEach((item,index) =>{
if(item.testNum != null && item.testNum != ''){
- for(let i =0; i < parseInt(item.testNum); i++){
+
+ // 鍏ㄦ
+ if(isInspection == 1) {
+ for(let i =0; i < parseInt(item.testNum); i++){
+ let fiber = {
+ ident: this.fiberList.length + 1,
+ bushColor: item.color,
+ color: colors2[i].label,
+ model: null,
+ standard: null,
+ productList: []
+ }
+ this.fiberList.push(fiber)
+ }
+ }else {
+ for(let i =0; i < parseInt(item.testNum); i++){
let fiber = {
ident: this.fiberList.length + 1,
bushColor: item.color,
@@ -1147,6 +1205,7 @@
}
this.fiberList.push(fiber)
}
+ }
}else {
flag = false
}
--
Gitblit v1.9.3