From b22ca897c863fc34f6f8f9a13c3e303f9f34c180 Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期二, 28 五月 2024 15:19:23 +0800 Subject: [PATCH] 光纤配置对接检验项目信息部分字段 --- src/components/do/b1-inspect-order-plan/Inspection.vue | 75 +++++++++++++++++++++---------------- 1 files changed, 43 insertions(+), 32 deletions(-) diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue index b41f179..b776a4f 100644 --- a/src/components/do/b1-inspect-order-plan/Inspection.vue +++ b/src/components/do/b1-inspect-order-plan/Inspection.vue @@ -241,9 +241,10 @@ <el-input v-else-if="getInspectionValueType(n.i) == 2" class="table_input" type="textarea" v-model="n.v.v" :disabled="getInspectionItemType(n.i) == 1 || (n.u != userId && n.u != undefined && n.u != '')" - @change="saveInsContext()" /> + @change="m=>changeInput(m,`${item.templateId}-${n.r}-${n.c}-${n.i}`)" /> <el-select v-else-if="getInspectionValueType(n.i) == 5" class="table_input" v-model="n.v.v" - :disabled="state>1" @visible-change="e=>getDic(e,n.i)" @change="saveInsContext()"> + :disabled="state>1" @visible-change="e=>getDic(e,n.i)" + @change="m=>changeInput(m,`${item.templateId}-${n.r}-${n.c}-${n.i}`)"> <el-option v-for="(e, i) in enumList" :key="i" :label="e.label" :value="e.value"></el-option> </el-select> <span :style="`font-family:${n.v.ff} !important;`" @@ -272,14 +273,14 @@ <span :style="`font-family:${n.v.ff} !important;`">{{getTell(n.i)}}</span> </template> <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='鏈�缁堝��' && state==1"> - <el-input class="table_input" type="textarea" + <!-- <el-input class="table_input" type="textarea" :disabled="getInspectionItemType(n.i) == 1 || (n.u != userId && n.u != undefined && n.u != '')" v-model="n.v.v" @change="saveInsContext()" v-if="getInspectionValueType(n.i) == 2"></el-input> <el-select v-else-if="getInspectionValueType(n.i) == 5" class="table_input" v-model="n.v.v" :disabled="state>1" @visible-change="e=>getDic(e,n.i)" @change="saveInsContext()"> <el-option v-for="(e, i) in enumList" :key="i" :label="e.label" :value="e.value"></el-option> - </el-select> - <span v-else :style="`font-family:${n.v.ff} !important;`">{{n.v.v}}</span> + </el-select> --> + <span :style="`font-family:${n.v.ff} !important;`">{{n.v.v}}</span> </template> <span v-else :style="`font-family:${n.v.ff} !important;`">{{n.v.v}}</span> </div> @@ -318,8 +319,8 @@ </el-table> </el-drawer> <el-drawer title="浠诲姟鍒囨崲" :visible.sync="taskVisible" :size="500"> - <ValueTable class="value-table" ref="insOrderPlan" :url="$api.insOrderPlan.selectInsOrderPlanList" - :componentData="componentData" :key="upIndex" style="max-height: 100%;height: inherit;"/> + <ValueTable class="value-table" ref="insOrderPlan" :url="$api.insOrderPlan.inspectionOrderDetailsTaskSwitching" + :componentData="componentData" :key="upIndex" style="height: 100%;"/> </el-drawer> <el-dialog title="妫�楠屽鏍�" :visible.sync="reviewDia" width="500px"> <div class="body" style="display: flex;padding: 10px;" v-if="reviewDia"> @@ -571,7 +572,7 @@ const mySet1 = new Set(); this.tableLists = this.currentSample.insProduct.filter(m => { let num0 = mySet1.size; - if (m.templateId != null) { + if (m.templateId != null&&m.template != null) { mySet1.add(JSON.stringify({ template: m.template, templateId: m.templateId @@ -843,15 +844,19 @@ if (b[0].r == a.r) { b.forEach(c => { if (c.c == a.c) { - if (!isNaN(parseFloat(c.v.v))) { - var tableCode = '' - for (var d in this.comparisonList) { - if (c.c == this.comparisonList[d].value) { - tableCode = this.comparisonList[d].label - break - } + var tableCode = '' + for (var d in this.comparisonList) { + if (c.c == this.comparisonList[d].value) { + tableCode = this.comparisonList[d].label + break } - comValue[(tableCode + (c.r + 1))] = parseFloat(c.v.v) + } + if(this.getInspectionValueType(item.i)==1){ + if (!isNaN(parseFloat(c.v.v))) { + comValue[(tableCode + (c.r + 1))] = parseFloat(c.v.v) + } + }else{ + comValue[(tableCode + (c.r + 1))] = c.v.v } } }) @@ -865,24 +870,22 @@ let comp = ask.map((m, i) => { if (m.includes('=')) { return res == m.split('=')[1] - } - if (m.includes('鈮�')) { + } else if (m.includes('鈮�')) { return res >= m.split('鈮�')[1] - } - if (m.includes('鈮�')) { + }else if (m.includes('鈮�')) { return res <= m.split('鈮�')[1] - } - if (m.includes('<')) { + }else if (m.includes('<')) { return res < m.split('<')[1] - } - if (m.includes('>')) { + }else if (m.includes('>')) { return res > m.split('>')[1] } }) - if (comp.every(m => m)) { - item.v.v = 1 - } else { - item.v.v = 0 + if(this.getInspectionValueType(item.i)==1){ + if (comp.every(m => m)) { + item.v.v = 1 + } else { + item.v.v = 0 + } } this.saveInsContext() } @@ -922,14 +925,18 @@ valueList.forEach(b => { str = str.replace(b.name, b.value) }) - if (item.v.f.includes('/') > -1) { + if (item.v.f.includes('/')) { if (Object.getOwnPropertyNames(comValue).length == valueList.length) { comResult = eval(str) } else { comResult = '' } } else { - comResult = eval(str) + if(this.getInspectionValueType(item.i)==1){ + comResult = eval(str) + }else{ + comResult = str + } } break; } @@ -937,8 +944,12 @@ if (a[0].r == item.r && comResult != '') { for (var b in a) { if (a[b].c == item.c) { - let val = parseFloat(comResult.toFixed(3)) - a[b].v.v = isNaN(val) ? '' : val + try{ + let val = parseFloat(comResult.toFixed(3)) + a[b].v.v = isNaN(val) ? '' : val + }catch(e){ + a[b].v.v = comResult + } break } } -- Gitblit v1.9.3