| | |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <fiberOpticConfig :currentId="currentId" @saveFiberopticConfig="getTotal()" v-if="configShow" :active="active" /> |
| | | <fiberOpticConfig :currentId="currentId" @saveFiberopticConfig="getTotal()" v-if="configShow && examine==0" :active="active" :inspectionItemST='inspectionItemST' /> |
| | | <fiberOpticConfigTwo :currentId="currentId" v-if="configShow && examine==1" :active="active" /> |
| | | <equipConfig :currentId="currentId" v-if="equipConfigShow" :active="active" /> |
| | | <cableConfig v-if="cableConfigShow" :active="active" /> |
| | | <!-- 单选特殊值处理框--> |
| | |
| | | <el-button type="primary" @click="spliceData">保存</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="单根垂直燃烧检测次数填写" :visible.sync="singleVerticalCombustionShow" width="900px" |
| | | :close-on-click-modal="false" :close-on-press-escape="false" |
| | | :before-close="beforeCirculateShowClose" :show-close="false"> |
| | | <div>111</div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="cleanSpliceData">取消</el-button> |
| | | <el-button type="primary" @click="spliceData">保存</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 电力试验室---温升试验/热循环 --> |
| | | <el-dialog :title="temperatureTitle" :visible.sync="temperatureShow" |
| | | :close-on-click-modal="false" :close-on-press-escape="false" |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | inspectionItemST: null, |
| | | sampleSelectionList: [],//样品表格选中数据 |
| | | editTable:[], |
| | | template: null, |
| | |
| | | entrustNum: '', |
| | | entrustPoint: '' |
| | | }, |
| | | singleVerticalCombustionShow: false, |
| | | isBsm2Val2:false, |
| | | opticalProject: [], // 温度循环弹框光纤项目列表 |
| | | opticalProjectList: [], // 温度循环弹框光纤项目选中的数组 |
| | |
| | | }) |
| | | this.filters = arr |
| | | } |
| | | } |
| | | }, |
| | | productListSelected: { |
| | | deep: true, |
| | | handler(val) { |
| | | if(val.length>0){ |
| | | for(let i =0 ; i< val.length; i++){ |
| | | if(val[i].inspectionItem.includes('松套管')){ |
| | | this.inspectionItemST = 1 |
| | | break; |
| | | }else{ |
| | | this.inspectionItemST = 0 |
| | | } |
| | | } |
| | | }else{ |
| | | this.inspectionItemST = 0 |
| | | } |
| | | |
| | | console.log('0000',this.inspectionItemST); |
| | | } |
| | | }, |
| | | sampleList: { |
| | |
| | | } |
| | | |
| | | // console.log('isHaveBushing===', this.totalArr) |
| | | let spcialItem = this.totalArr.find(a => a.state == 1 && a.inspectionItem.includes('松套管')) |
| | | if (productListSelected && select[2] === '光缆' && isHaveBushing === false) { |
| | | let spcialItem = this.totalArr.filter(a => a.state == 1 && a.inspectionItem.includes('松套管')) |
| | | if (productListSelected && select[2] === '光缆' && isHaveBushing === false&&spcialItem.length==0) { |
| | | this.$message.error('光缆温度循环项目必须进行光纤配置') |
| | | this.$refs.sampleTable.setCurrentRow(this.currentMethod, true) |
| | | this.rowClick(this.currentMethod) |
| | | this.sampleIds = [this.currentMethod.id] |
| | | this.openConfig() |
| | | return |
| | | }else if(spcialItem&& isHaveBushing === false){ |
| | | }else if(spcialItem.length>0&& isHaveBushing === false){ |
| | | this.$message.error('松套管项目必须进行光纤配置') |
| | | this.$refs.sampleTable.setCurrentRow(this.currentMethod, true) |
| | | this.rowClick(this.currentMethod) |
| | | this.sampleIds = [this.currentMethod.id] |
| | | // this.$refs.sampleTable.setCurrentRow(this.currentMethod, true) |
| | | // this.rowClick(this.currentMethod) |
| | | spcialItem.forEach(item=>{ |
| | | this.sampleIds.push(item.id) |
| | | }) |
| | | this.openConfig() |
| | | return |
| | | } |
| | |
| | | if(['≤','≥','>','<','='].includes(ele.ask[0])){ |
| | | const askVal = ele.ask.substring(1,ele.ask.length) |
| | | if(isNaN(askVal) || ele.tell.indexOf(askVal)<0){ |
| | | console.log(1111); |
| | | isTrue = false |
| | | } |
| | | } |
| | |
| | | if(ele.ask.indexOf('-')>0 && ele.ask.length>1){ |
| | | //要求描述的~和要求值的-,等效 |
| | | let tell = ele.tell |
| | | if(ele.tell.indexOf('~')>0){ |
| | | tell = ele.tell.replace('~','-') |
| | | if(ele.tell.indexOf('~')>0 || ele.tell.indexOf('(') || ele.tell.indexOf(')')){ |
| | | tell = tell.replace('~','-') |
| | | tell = tell.replace('(','(') |
| | | tell = tell.replace(')',')') |
| | | } |
| | | const splits = ele.ask.split('-') |
| | | //满足格式要求,并且两个都是数字 |
| | |
| | | let min = Math.min(...splits) |
| | | let max = Math.max(...splits) |
| | | if(min==max){ |
| | | console.log(2222); |
| | | isTrue = false |
| | | } |
| | | //要求描述中不包含±以及区间的数字,则返回false |
| | | if((tell.indexOf('±')<0&&tell.indexOf('-')<0)){ |
| | | if(tell.indexOf('±')<0&&tell.indexOf('-')<0){ |
| | | console.log(3333,ele); |
| | | console.log(3333333,tell,tell.indexOf('±')<0,tell.indexOf('-')<0); |
| | | isTrue = false |
| | | }else if(ele.tell.indexOf('-')==0){ |
| | | console.log(4444); |
| | | isTrue = false |
| | | }else if(tell.indexOf('-')>0){ |
| | | const splitTells = tell.split('-') |
| | | if(splitTells[0].indexOf(min)<0 || splitTells[1].indexOf(max)<0){ |
| | | isTrue = false |
| | | } |
| | | }else if(tell.indexOf('±')>0&&tell!=ele.ask){ |
| | | //校验要求描述为10±5这种写法的情况 |
| | | let splitNums = ele.tell.split('±') |
| | | if(splitNums.length<2){ |
| | | isTrue = false |
| | | if(tell.indexOf('±')>0){ |
| | | ////校验要求描述为(10-15)±5这种写法的情况 |
| | | const num = tell.split('±')[1] |
| | | const startIndex = tell.indexOf('(') |
| | | const endIndex = tell.indexOf(')') |
| | | if(startIndex>-1 && endIndex>0 ){ |
| | | const str = tell.substring(startIndex,endIndex) |
| | | if(str && str.indexOf('-')>0){ |
| | | let strList = str.split('-') |
| | | const minNum = Number(strList[0]-num) |
| | | const maxNum = Number(strList[1]+num) |
| | | if(minNum>min || maxNum<max){ |
| | | console.log(555555); |
| | | isTrue = false |
| | | } |
| | | } |
| | | }else{ |
| | | //校验要求描述为10±5这种写法的情况 |
| | | let splitNums = ele.tell.split('±') |
| | | if(splitNums.length<2){ |
| | | console.log(66666); |
| | | isTrue = false |
| | | }else{ |
| | | let minTell = Number(splitNums[0])-Number(splitNums[1]) |
| | | let maxTell = Number(splitNums[0])+Number(splitNums[1]) |
| | | if(minTell!=min || maxTell!=max){ |
| | | console.log(7777777); |
| | | isTrue = false |
| | | } |
| | | } |
| | | } |
| | | }else{ |
| | | let minTell = Number(splitNums[0])-Number(splitNums[1]) |
| | | let maxTell = Number(splitNums[0])+Number(splitNums[1]) |
| | | if(minTell!=min || maxTell!=max){ |
| | | const splitTells = tell.split('-') |
| | | if(splitTells[0].indexOf(min)<0 || splitTells[1].indexOf(max)<0){ |
| | | console.log(88888888); |
| | | isTrue = false |
| | | } |
| | | } |
| | | } |
| | | }else{ |
| | | console.log(89999999); |
| | | isTrue = false |
| | | } |
| | | } |
| | | // else if(ele.ask.indexOf('&')>0 && ele.ask.length>1){ |
| | | // //判断 |
| | | // } |
| | | }) |
| | | }catch(error){ |
| | | console.log(error); |
| | |
| | | this.selectTree = '' |
| | | this.models = val.children |
| | | this.getNodeParent(node) |
| | | |
| | | let flag = false |
| | | if (node.level == 3) { |
| | | if(node.data.children.length>0){ |
| | | node.data.children.forEach(a => { |
| | | let key = Object.keys(a) |
| | | if(!key.includes('level')) { |
| | | flag = true |
| | | } |
| | | }) |
| | | |
| | | } |
| | | } |
| | | this.selectTree = this.selectTree.replace(' - ', '') |
| | | if(flag) { |
| | | this.selectTree = '- - ' + this.selectTree |
| | | } |
| | | let data = this.selectTree.split(' - ') |
| | | let data2 = '' |
| | | for (let index = data.length - 1; index >= 0; index--) { |
| | |
| | | this.addObj.factory = trees[0] |
| | | this.addObj.laboratory = trees[1] |
| | | this.addObj.sampleType = trees[2] |
| | | if (trees[3] === undefined || trees[3] === '') { |
| | | if (trees[3] === undefined || trees[3] === '' || trees[3] === '- ') { |
| | | this.addObj.sample = trees[2] |
| | | } else { |
| | | this.addObj.sample = trees[3] |
| | |
| | | this.sample.unit = this.addObj.unit |
| | | this.sample.standardMethodListId = null |
| | | this.sample.insProduct = [] |
| | | this.sample.id = this.count |
| | | this.sample.id = parseInt(i+1) |
| | | this.sample.childSampleList = [] |
| | | this.sample.insulating = null |
| | | this.sample.sheath = null |
| | | this.sampleList.push(this.HaveJson(this.sample)) |
| | | this.count++ |
| | | // this.count++ |
| | | } |
| | | this.computationalPairing(this.sampleList.length) |
| | | this.bsm2Val2 = this.HaveJson(this.bsm2Val3) |
| | |
| | | } else if ((row.inspectionItem === '温升试验' || row.inspectionItem === '热循环') && row.state === 0) { |
| | | this.temperatureShow = false; |
| | | } |
| | | // if (row.inspectionItem === '单根垂直燃烧' && select[2] === '光缆' && row.state === 1) { |
| | | // this.singleVerticalCombustionShow = true; |
| | | // return |
| | | // } else if (row.inspectionItem === '单根垂直燃烧' && select[2] === '光缆' && row.state === 0) { |
| | | // this.singleVerticalCombustionShow = false; |
| | | // } |
| | | |
| | | this.changeProductList0() |
| | | this.currentMethod.insProduct = this.productList0 |
| | | this.getProNum() |
| | |
| | | this.getProductLoad = true |
| | | let selectTreeList = this.selectTree.split(" - ") |
| | | this.addObj.model&&(selectTreeList[selectTreeList.length - 1] = this.addObj.model) |
| | | |
| | | console.log( this.selectTree); |
| | | this.$axios.post(this.$api.standardTree.selectStandardProductList, { |
| | | model: (this.addObj.model?this.addObj.model:row.model) + '-' + row.modelNum, |
| | | standardMethodListId: val, |
| | |
| | | }, |
| | | // 要求值变化时 |
| | | requestChange(e, row,type) { |
| | | this.sampleList.map(item => { |
| | | if (this.sampleIds.indexOf(item.id) > -1) { |
| | | item.insProduct.map(m => { |
| | | if (m.id == row.id) { |
| | | m[type] = e; |
| | | //this.currentMethod 当前样品id |
| | | this.sampleList.forEach(item=>{ |
| | | if(item.id == this.currentMethod.id){ |
| | | item.insProduct.forEach(i=>{ |
| | | if(i.id == row.id){ |
| | | i[type] = e |
| | | } |
| | | return m; |
| | | }) |
| | | } |
| | | return item |
| | | }) |
| | | // this.sampleList.map(item => { |
| | | // if (this.sampleIds.indexOf(item.id) > -1) { |
| | | // item.insProduct.map(m => { |
| | | // if (m.id == row.id) { |
| | | // m[type] = e; |
| | | // } |
| | | // return m; |
| | | // }) |
| | | // } |
| | | // return item |
| | | // }) |
| | | }, |
| | | selectStandardMethods() { |
| | | this.$axios.get(this.$api.standardTree.selectStandardMethodEnum).then(res => { |