lxp
2024-08-12 da9c0b8c1b35edfa586f523692a6c27e8fb4d338
	modified:   src/components/do/b1-ins-order/fiberoptic-config.vue
已修改1个文件
71 ■■■■■ 文件已修改
src/components/do/b1-ins-order/fiberoptic-config.vue 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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
          }