From 22b1e8c61b4cf049f1c980aea459f3b90620a1b0 Mon Sep 17 00:00:00 2001
From: 晏有为 <13214124+yan-youwei@user.noreply.gitee.com>
Date: 星期四, 23 五月 2024 17:26:12 +0800
Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/center-lims-before

---
 src/components/do/b1-inspect-order-plan/Inspection.vue |   71 ++++++++++++++++++++---------------
 1 files changed, 41 insertions(+), 30 deletions(-)

diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index ca447d2..49302c5 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>
@@ -319,7 +320,7 @@
     </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;"/>
+        :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">
@@ -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