Parcourir la source

fix(inspectionTemplate): 修复工艺参数单位显示逻辑

yusheng il y a 1 jour
Parent
commit
20a4ba7d42
1 fichiers modifiés avec 24 ajouts et 5 suppressions
  1. 24 5
      src/views/inspectionTemplate/AddorUpdate.vue

+ 24 - 5
src/views/inspectionTemplate/AddorUpdate.vue

@@ -244,9 +244,13 @@
                 (row.textType == 3 ? '.minValue' : '.defaultValue')
               "
             >
-              <div style="width: 100%; display: flex;justify-content: center;">
+              <div style="width: 100%; display: flex; justify-content: center">
                 <div v-if="row.textType == 3 || row.textType == 8">
-                  <el-input v-model="row.defaultValue" style="width: 200px">
+                  <el-input
+                    v-model="row.defaultValue"
+                    style="width: 200px"
+                    v-if="row.textType == 8"
+                  >
                     <template slot="append">
                       <DictSelection
                         dictName="工艺参数单位"
@@ -260,15 +264,30 @@
                   </el-input>
                   <el-input
                     v-model="row.minValue"
-                    style="width: 80px"
+                    :style="{ width: row.textType == 3 ? '130px' : '80px' }"
                   ></el-input>
                   <span>-</span>
 
-                  <el-input v-model="row.maxValue" style="width: 80px">
+                  <el-input
+                    v-model="row.maxValue"
+                    :style="{ width: row.textType == 3 ? '130px' : '80px' }"
+                  >
                   </el-input>
+                  <DictSelection
+                    dictName="工艺参数单位"
+                    clearable
+                    filterable
+                    v-if="row.textType == 3"
+                    v-model="row.unitName"
+                    style="width: 100px"
+                  >
+                  </DictSelection>
                 </div>
 
-                <div v-else style="width: 100%;display: flex;justify-content: center;">
+                <div
+                  v-else
+                  style="width: 100%; display: flex; justify-content: center"
+                >
                   <DictSelection
                     style="width: 85px"
                     clearable