瀏覽代碼

bugfix: 8511

reaper 4 年之前
父節點
當前提交
34e522420d

+ 10 - 0
src/components/knowledgeExtra/AddAssess/index.vue

@@ -234,6 +234,11 @@ it .ql-editor,
                     type="number"
                     maxlength="6"
                     v-model.number="table.factor"
+                    @input="
+                      value = table.factor + '';
+                      if (value.length > 8) value = value.slice(0, 8);
+                      table.factor = parseFloat(value);
+                    "
                   />
                 </el-form-item>
                 <el-form-item
@@ -249,6 +254,11 @@ it .ql-editor,
                     type="number"
                     maxlength="6"
                     v-model.number="table.constant"
+                    @input="
+                      value = table.constant + '';
+                      if (value.length > 8) value = value.slice(0, 8);
+                      table.constant = parseFloat(value);
+                    "
                   />
                 </el-form-item>
               </div>

+ 9 - 3
src/components/knowledgeExtra/AddAssess/scale-table.vue

@@ -246,7 +246,10 @@
                       tableIndex,
                       scope.$index,
                       'two_factor'
-                    )
+                    );
+                    value = scope.row.two_factor + '';
+                    if (value.length > 8) value = value.slice(0, 8);
+                    scope.row.two_factor = parseFloat(value);
                   "
                 ></el-input>
               </el-form-item>
@@ -277,7 +280,10 @@
                       tableIndex,
                       scope.$index,
                       'two_constant'
-                    )
+                    );
+                    value = scope.row.two_constant + '';
+                    if (value.length > 8) value = value.slice(0, 8);
+                    scope.row.two_constant = parseFloat(value);
                   "
                 ></el-input>
               </el-form-item>
@@ -404,7 +410,7 @@
                 @input="
                   value = scope.row.score + '';
                   if (value.length > 6) value = value.slice(0, 6);
-                  scope.row.score = parseInt(value);
+                  scope.row.score = parseFloat(value);
                 "
                 v-model.number="scope.row.score"
                 clearable