| | |
| | | </el-select> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | | <el-col class="search_thing" :span="6" style="display: none;"> |
| | | <div class="search_label"><span class="required-span">* </span>委托人:</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" clearable disabled v-model="addObj.custom"></el-input> |
| | |
| | | <template slot="append"><el-button slot="append" icon="el-icon-search" @click="selectUserDia = true" |
| | | :disabled="active>1"></el-button></template> |
| | | </el-input> --> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | | <div class="search_label">制单人:</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="addObj.prepareUser" :readonly="active>1"></el-input> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | |
| | | <div class="search_label">OTC订单号:</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="addObj.otcCode" :readonly="active>1"></el-input> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | | <div class="search_label">制单人:</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="addObj.prepareUser" :readonly="active>1"></el-input> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6" style="align-items: flex-start;margin: 8px 0;"> |
| | |
| | | totalArr: [], |
| | | model: null, |
| | | standardMethodListId: null, |
| | | symbolList:[ |
| | | 'RTS','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'] |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | this.selectUserDia = false |
| | | }, |
| | | containsValue(str) { |
| | | let arr = ['RTS','D','W','X','H','L'] |
| | | let symbolItem = '' |
| | | arr.some(value =>{ |
| | | this.symbolList.some(value =>{ |
| | | if(str.includes(value)){ |
| | | symbolItem = value |
| | | return true |
| | |
| | | return code[index] + '' + num |
| | | } |
| | | } |
| | | }catch(e){} |
| | | }, |
| | | handleTell(tell,symbolItem, value){ |
| | | try{ |
| | | let num = this.replaceAll(tell, symbolItem, value) |
| | | return num |
| | | }catch(e){} |
| | | }, |
| | | replaceAll(str,find,value) { |
| | |
| | | this.saveMethod(sampleList) |
| | | }).catch(() => {}) |
| | | }else{ |
| | | let isRTS = this.totalArr.find(a => a.ask != null && (a.ask.includes('RTS') || a.ask.includes('D') || a.ask |
| | | .includes('W') || |
| | | a.ask.includes('X') || a.ask.includes('H') || a.ask.includes('L')) && a.state == 1) |
| | | let isRTS = this.totalArr.find(a => a.ask != null && this.symbolList.find(b=>a.ask.includes(b)) && a.state == 1) |
| | | if (isRTS) { |
| | | this.editTable = this.handleData(sampleList,this.containsValue, 0) |
| | | this.bsm3Dia = true; |
| | |
| | | if (ask) { |
| | | a.ask = ask |
| | | } |
| | | let tell = this.handleTell(a.tell, f.symbolItem,f.value) |
| | | if (tell) { |
| | | a.tell = tell |
| | | } |
| | | } |
| | | }) |
| | | } |
| | |
| | | let str = calBack(c.ask) |
| | | str&&obj.symbolList.push(str) |
| | | }else if(type==1){ |
| | | // let ask = calBack(c.ask, c.rts) |
| | | // if (ask && c.state == 1) { |
| | | // c.ask = csk |
| | | // } |
| | | let arr = this.editTable.filter(b => b.sampleId == item.id) |
| | | arr.forEach(f => { |
| | | if(c.ask.includes(f.symbolItem)){ |
| | | let ask = calBack(c.ask, f.symbolItem,f.value) |
| | | if (ask) { |
| | | c.ask = ask |
| | | } |
| | | let tell = this.handleTell(c.tell, f.symbolItem,f.value) |
| | | if (tell) { |
| | | c.tell = tell |
| | | } |
| | | } |
| | | }) |
| | |
| | | if (ask) { |
| | | c.ask = ask |
| | | } |
| | | let tell = this.handleTell(c.tell, f.symbolItem,f.value) |
| | | if (tell) { |
| | | c.tell = tell |
| | | } |
| | | } |
| | | }) |
| | | } |
| | |
| | | if (ask) { |
| | | d.ask = ask |
| | | } |
| | | let tell = this.handleTell(d.tell, f.symbolItem,f.value) |
| | | if (tell) { |
| | | d.tell = tell |
| | | } |
| | | } |
| | | }) |
| | | } |
| | |
| | | } |
| | | this.excelMethodList.forEach(item => { |
| | | if (item.valueList.find(m => m.r == r && m.c == c)) { |
| | | console.log(item) |
| | | var comValue = {} |
| | | item.valueList.forEach(a => { |
| | | list.forEach(b => { |
| | |
| | | for (var a in comValue) { |
| | | arr0.push(comValue[a]) |
| | | } |
| | | comResult = Math.abs(arr[0]) |
| | | comResult = Math.abs(arr0[0]) |
| | | break; |
| | | // case 'MAX': |
| | | // let arr1 = [] |
| | | // for (var a in comValue) { |
| | | // arr1.push(eval(comValue[a])) |
| | | // } |
| | | // comResult = Math.max(...arr1) |
| | | // break; |
| | | // case 'MIN': |
| | | // let arr2 = [] |
| | | // for (var a in comValue) { |
| | | // arr2.push(eval(comValue[a])) |
| | | // } |
| | | // comResult = Math.median(...arr2) |
| | | // break; |
| | | default: |
| | | let valueList = []; |
| | | item.valueList.forEach(a => { |
| | |
| | | valueList.forEach(b => { |
| | | str = str.replace(b.name, b.value) |
| | | }) |
| | | str = str.replaceAll('MAX', 'Math.max') |
| | | str = str.replaceAll('MIN', 'Math.min') |
| | | str = str.replaceAll(',', ',') |
| | | try { |
| | | if(this.getInspectionValueType(item.i)==1){ |
| | | comResult = eval(str) |
| | |
| | | } |
| | | break; |
| | | } |
| | | console.log(comResult) |
| | | list.forEach(a => { |
| | | if (a[0].r == item.r && comResult != '') { |
| | | for (var b in a) { |
| | |
| | | item.methodName = item.v.f.split('=').length > 1 && item.v.f.split('=')[1].split('(') && item.v.f.split( |
| | | '=')[1].split('(')[0] ? item.v.f.split('=')[1].split('(')[0] : '自定义方法'; |
| | | let valueList = []; |
| | | if (item.v.f.includes(':')) { |
| | | if(item.v.f.includes('MAX') || item.v.f.includes('MIN')){ |
| | | item.methodName = '自定义方法' |
| | | let regex = /[=\+\-\*\%\/\^\s]/g |
| | | let mode = item.v.f.replace(regex, ' ').split(' '); |
| | | let that = this |
| | | if(item.v.f.includes('MAX')){ |
| | | item.v.f = Judgment(item.v.f, 'MAX') |
| | | } |
| | | if(item.v.f.includes('MIN')){ |
| | | item.v.f = Judgment(item.v.f, 'MIN') |
| | | } |
| | | function Judgment(f,type) { |
| | | let newF = f |
| | | let mode4 = mode.filter(m => m&&m.includes(type)) |
| | | mode4.forEach(m => { |
| | | let mode0 = m |
| | | if(mode0.includes(':')){ |
| | | let r0 = null; |
| | | let c0 = null; |
| | | let r1 = null; |
| | | let c1 = null; |
| | | let mode1 = mode0.split('(')[1].split(')')[0]; |
| | | let start = mode1.split(':')[0] |
| | | let end = mode1.split(':')[1] |
| | | c0 = that.comparisonList.find(j => j.label == start.split('')[0]).value |
| | | r0 = start.replace(/[a-zA-Z]/g, "") - 1 |
| | | c1 = that.comparisonList.find(j => j.label == end.split('')[0]).value |
| | | r1 = end.replace(/[a-zA-Z]/g, "") - 1 |
| | | let valueList0 = [] |
| | | for (let i = Number(r0); i <= Number(r1); i++) { |
| | | for (let u = Number(c0); u <= Number(c1); u++) { |
| | | valueList0.push({ |
| | | r: i, |
| | | c: u |
| | | }) |
| | | } |
| | | } |
| | | let valueList1 = [] |
| | | valueList0.forEach(v => { |
| | | let r = ''; |
| | | let c = ''; |
| | | r = v.r +1; |
| | | c = that.comparisonList.find(j => j.value == v.c).label |
| | | valueList1.push(c+r) |
| | | }) |
| | | let mode3 = type+'('+valueList1.join(',')+')' |
| | | newF = newF.replace(mode0, mode3) |
| | | valueList = [...valueList,...valueList0] |
| | | }else{ |
| | | let mode1 = mode0.replace(type, '').replace(/[=\+\-\*\%\(\)\/\^\s]/g, ''); |
| | | let modeList = mode1.split(','); |
| | | modeList.filter(m => m && !Number(m)).forEach(m => { |
| | | let r = m.replace(/[a-zA-Z]/g, "") - 1 |
| | | let c = that.comparisonList.find(j => j.label == m.split('')[0]).value |
| | | valueList.push({ |
| | | c, |
| | | r |
| | | }) |
| | | }) |
| | | } |
| | | }) |
| | | return newF |
| | | } |
| | | }else if (item.v.f.includes(':')) { |
| | | valueList = []; |
| | | let r0 = null; |
| | | let c0 = null; |
| | |
| | | Vue.prototype.PROJECT = '检测中心' |
| | | // Vue.prototype.PROJECT = '装备电缆' |
| | | //本地 |
| | | // Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80"; |
| | | Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80"; |
| | | // const javaApi = 'http://127.0.0.1:8001'; |
| | | // const javaApi = 'http://192.168.0.104:8001'; |
| | | const javaApi = 'http://192.168.0.104:8001'; |
| | | |
| | | //云 |
| | | // Vue.prototype.LOCATIONVUE = "http://114.132.189.42:8080"; |
| | | // const javaApi = 'http://114.132.189.42:1234'; |
| | | |
| | | //检测中心正式库 |
| | | Vue.prototype.LOCATIONVUE = "http://10.1.200.86:8080"; |
| | | const javaApi = 'http://10.1.200.86:8001'; |
| | | // Vue.prototype.LOCATIONVUE = "http://10.1.200.86:8080"; |
| | | // const javaApi = 'http://10.1.200.86:8001'; |
| | | |
| | | //装备电缆测试库 |
| | | // Vue.prototype.LOCATIONVUE = "http://10.16.173.59"; |