|
@@ -231,10 +231,10 @@ it .ql-editor,
|
|
|
>
|
|
|
<el-input
|
|
|
:id="`klScaleParent[${tableIndex}].factor`"
|
|
|
- type="number"
|
|
|
- maxlength="6"
|
|
|
- v-model.number="table.factor"
|
|
|
- @input="table.factor = numInputInput(table.factor)"
|
|
|
+ type="text"
|
|
|
+ maxlength="7"
|
|
|
+ v-model="table.factor"
|
|
|
+ @input="table.factor = numInputChange(table.factor)"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item
|
|
@@ -247,10 +247,10 @@ it .ql-editor,
|
|
|
<el-input
|
|
|
:ref="`klScaleParent[${tableIndex}].constant`"
|
|
|
:id="`klScaleParent[${tableIndex}].constant`"
|
|
|
- type="number"
|
|
|
- maxlength="6"
|
|
|
- v-model.number="table.constant"
|
|
|
- @input="table.constant = numInputInput(table.constant)"
|
|
|
+ type="text"
|
|
|
+ maxlength="7"
|
|
|
+ v-model="table.constant"
|
|
|
+ @input="table.constant = numInputChange(table.constant)"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -365,12 +365,12 @@ it .ql-editor,
|
|
|
/>
|
|
|
</el-form>
|
|
|
<!-- 暂时用的按钮 -->
|
|
|
- <!-- <button
|
|
|
+ <button
|
|
|
style="position: fixed; bottom: 20px; right: 20px; font-size: 16px"
|
|
|
@click="assessCommitTest"
|
|
|
>
|
|
|
暂时用的按钮
|
|
|
- </button> -->
|
|
|
+ </button>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -386,7 +386,7 @@ import { container, ImageExtend, QuillWatch } from "quill-image-extend-module";
|
|
|
Quill.register("modules/ImageExtend", ImageExtend);
|
|
|
import ScoreResultsTable from "./ScoreResultsTable.vue";
|
|
|
import rules from "./rules";
|
|
|
-import { numInputInput } from "./util";
|
|
|
+import { numInputChange } from "./util";
|
|
|
const defaultDate = {
|
|
|
groupId: new Date().valueOf().toString(),
|
|
|
issueId: new Date().valueOf().toString() + "-" + new Date().valueOf(),
|
|
@@ -479,7 +479,7 @@ export default {
|
|
|
remark: "string",
|
|
|
resultType: 1,
|
|
|
ruleCode: "string",
|
|
|
- score: "",
|
|
|
+ score: null,
|
|
|
status: 1,
|
|
|
textType: 11
|
|
|
}
|
|
@@ -555,7 +555,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- numInputInput,
|
|
|
+ numInputChange,
|
|
|
clearValidate(data) {
|
|
|
this.$refs.ScoreResultsRef.clearValidate(data);
|
|
|
},
|
|
@@ -784,14 +784,45 @@ export default {
|
|
|
}
|
|
|
// 14 提交数据设置新的orderNo,删除issueId
|
|
|
params.klScaleParent.forEach((tableItem, tableIndex) => {
|
|
|
- tableItem.orderNo = tableIndex;
|
|
|
+ // tableItem.orderNo = tableIndex;
|
|
|
+ // console.log(
|
|
|
+ // "????",
|
|
|
+ // typeof tableItem.constant + tableItem.constant,
|
|
|
+ // typeof tableItem.factor + tableItem.factor,
|
|
|
+ // typeof tableItem.score + tableItem.score
|
|
|
+ // );
|
|
|
+ typeof tableItem.constant == "string" &&
|
|
|
+ (tableItem.constant = parseFloat(tableItem.constant));
|
|
|
+ typeof tableItem.factor == "string" &&
|
|
|
+ (tableItem.factor = parseFloat(tableItem.factor));
|
|
|
+ typeof tableItem.score == "string" &&
|
|
|
+ (tableItem.score = parseFloat(tableItem.score));
|
|
|
tableItem.klScaleSaveGroup.forEach((groupItem, groupIndex) => {
|
|
|
groupItem.groupNum = groupIndex;
|
|
|
groupItem.klScaleSub.forEach((issueItem, issueIndex) => {
|
|
|
issueItem.orderNo = issueIndex;
|
|
|
issueItem.issueId && delete issueItem.issueId;
|
|
|
+ // console.log(
|
|
|
+ // "issueItem",
|
|
|
+ // typeof issueItem.constant == "string" + issueItem.constant,
|
|
|
+ // typeof issueItem.factor == "string" + issueItem.factor,
|
|
|
+ // typeof issueItem.score == "string" + issueItem.score
|
|
|
+ // );
|
|
|
+ typeof issueItem.constant == "string" &&
|
|
|
+ (issueItem.constant = parseFloat(issueItem.constant));
|
|
|
+ typeof issueItem.factor == "string" &&
|
|
|
+ (issueItem.factor = parseFloat(issueItem.factor));
|
|
|
+ typeof issueItem.score == "string" &&
|
|
|
+ (issueItem.score = parseFloat(issueItem.score));
|
|
|
+
|
|
|
issueItem.klScaleDetail.forEach((optionItem, optionIndex) => {
|
|
|
optionItem.orderNo = optionIndex;
|
|
|
+ // console.log(
|
|
|
+ // "optionItem.score",
|
|
|
+ // typeof optionItem.score == "string" + optionItem.score
|
|
|
+ // );
|
|
|
+ typeof optionItem.score == "string" &&
|
|
|
+ (optionItem.score = parseFloat(optionItem.score));
|
|
|
});
|
|
|
});
|
|
|
});
|
|
@@ -1164,7 +1195,7 @@ export default {
|
|
|
watch: {
|
|
|
scaleData: {
|
|
|
handler() {
|
|
|
- console.log("监听");
|
|
|
+ console.log("监听", this.scaleData);
|
|
|
this.resizeTable();
|
|
|
},
|
|
|
deep: true
|