Commit 348613d7 by chenwq1

fix: 更新修复

1 parent c4cd3604
......@@ -20,7 +20,7 @@
"core-js": "^3.6.5",
"dayjs": "^1.10.7",
"echarts": "^5.2.2",
"glsk-oss-jssdk": "^1.0.6",
"glsk-oss-jssdk": "^1.0.8",
"image-conversion": "^2.1.1",
"ionicons": "^8.0.9",
"lib": "file:../lib",
......
......@@ -45,8 +45,8 @@ importers:
specifier: ^5.2.2
version: 5.6.0
glsk-oss-jssdk:
specifier: ^1.0.6
version: 1.0.6
specifier: ^1.0.8
version: 1.0.8
image-conversion:
specifier: ^2.1.1
version: 2.1.1
......@@ -1826,8 +1826,8 @@ packages:
resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==}
engines: {node: '>=10'}
glsk-oss-jssdk@1.0.6:
resolution: {integrity: sha512-uifUcPNbb6Roas0Dlx6LRldHPwU1yQqJbQRldUaNB+e6stFvn9XrsewCueNDUty3cZw4NCg3yao2WVCUm3T2Og==}
glsk-oss-jssdk@1.0.8:
resolution: {integrity: sha512-X6UeEMQdVJS6T6m587E+wTr7MEmpxrewGC1uX5PfonrWXIuOU3AwUD0bb1CVIMRLrKqDBcNHEfA/VlmKgwCGMg==}
good-listener@1.2.2:
resolution: {integrity: sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==}
......@@ -5014,7 +5014,7 @@ snapshots:
merge2: 1.4.1
slash: 3.0.0
glsk-oss-jssdk@1.0.6:
glsk-oss-jssdk@1.0.8:
dependencies:
ali-oss: 6.23.0
axios: 1.15.0
......
<template>
<div>
<div class="pageBox_title">
编辑检测报告
<a-button style="float: right;" @click="handleBack()">返回列表</a-button>
</div>
<InformationEdit ref="informationEditRef" :pageData="pageData.inspectionWORespVO || {}" />
<div class="optionBox">
<div v-for="item in nodeList" @click="handleNodeList(item)" :key="item.id"
:class="{ 'optionBut_active': item.id == activeNodeId }" class="optionBut">
{{ item.nodeName }}
<CheckCircleFilled v-if="item.completedFlag == '1'" class="circleFilled" />
<div class="detection-order-edit-page">
<div class="detection-order-edit__header">
<div class="pageBox_title">
编辑检测报告
<a-button style="float: right;" @click="handleBack()">返回列表</a-button>
</div>
<InformationEdit ref="informationEditRef" :pageData="pageData.inspectionWORespVO || {}" />
<div class="optionBox">
<div v-for="item in nodeList" @click="handleNodeList(item)" :key="item.id"
:class="{ 'optionBut_active': item.id == activeNodeId }" class="optionBut">
{{ item.nodeName }}
<CheckCircleFilled v-if="item.completedFlag == '1'" class="circleFilled" />
</div>
</div>
</div>
<div class="customizeFormBox" v-if="activeNodeId != -1">
......@@ -196,6 +198,19 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
</script>
<style scoped lang="less">
.detection-order-edit-page {
display: flex;
flex: 1;
flex-direction: column;
min-height: 0;
overflow: hidden;
}
.detection-order-edit__header {
flex-shrink: 0;
overflow: hidden;
}
.pageBox_title {
width: 100%;
height: 24px;
......@@ -238,8 +253,11 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
}
.customizeFormBox {
flex: 1;
min-height: 0;
width: 100%;
float: left;
overflow-x: hidden;
overflow-y: auto;
}
.circleFilled {
......@@ -247,4 +265,12 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
color: #1956fe;
padding-left: 2px;
}
</style>
<style lang="less">
.inner-main > .main:has(.detection-order-edit-page) {
display: flex;
flex-direction: column;
overflow: hidden;
}
</style>
\ No newline at end of file
......@@ -12,8 +12,8 @@
v-model:value="postData.exteriorScore"
:min="0"
:max="100"
:step="0.01"
:precision="2"
:step="1"
:precision="0"
:controls="false"
class="score-value-input"
placeholder="请输入"
......@@ -28,7 +28,7 @@
v-model:value="postData.exteriorScore"
:min="0"
:max="100"
:step="0.01"
:step="1"
/>
</div>
</div>
......@@ -224,9 +224,9 @@
<a-input-number
v-model:value="postData.overallScore"
:min="0"
:max="200"
:step="0.01"
:precision="2"
:max="100"
:step="1"
:precision="0"
:controls="false"
class="score-value-input"
placeholder="请对车况做整体总结,如:车况良好,仅有正常使痕迹,无重大事故..."
......@@ -241,7 +241,7 @@
v-model:value="postData.overallScore"
:min="0"
:max="100"
:step="0.01"
:step="1"
/>
</div>
</div>
......@@ -388,6 +388,8 @@ export default class TestingScore extends Vue {
if (data.length > 0) {
const inspectionScore = data[0].inspectionScoreVO || {};
this.postData = { ...this.postData, ...inspectionScore };
this.postData.exteriorScore = this.normalizeIntegerScore(this.postData.exteriorScore);
this.postData.overallScore = this.normalizeIntegerScore(this.postData.overallScore);
}
this.snapshotInitialPostData();
});
......@@ -411,6 +413,18 @@ export default class TestingScore extends Vue {
return changed.filter((k) => !ignoreKeys.has(k));
}
/** 将评分规范为 0–100 的整数,无效值返回 null */
normalizeIntegerScore(value: unknown): number | null {
if (value === null || value === undefined || value === "") {
return null;
}
const n = Math.round(Number(value));
if (Number.isNaN(n) || n < 0 || n > 100) {
return null;
}
return n;
}
/** 评分为 0 视为已填写;仅 null / undefined / 空字符串 视为未填 */
isScoreFilled(value: unknown): boolean {
if (value === 0 || value === "0") {
......@@ -475,7 +489,7 @@ export default class TestingScore extends Vue {
return;
}
if (!this.postData.exteriorComment) {
message.error("请说明外观主要扣分项");
message.error("请输入外观评分的评分依据");
return;
}
if (!this.postData.skeletonLevel) {
......@@ -483,7 +497,7 @@ export default class TestingScore extends Vue {
return;
}
if (!this.postData.skeletonComment) {
message.error("请查验车辆骨架相关部位和程度");
message.error("请输入骨架评级的评分依据");
return;
}
if (!this.postData.interiorLevel) {
......@@ -491,7 +505,7 @@ export default class TestingScore extends Vue {
return;
}
if (!this.postData.interiorComment) {
message.error("请查验车辆内饰相关部位和程度");
message.error("请输入内饰评级的评分依据");
return;
}
if (!this.isScoreFilled(this.postData.overallScore)) {
......@@ -499,13 +513,15 @@ export default class TestingScore extends Vue {
return;
}
if (!this.postData.overallComment) {
message.error("请对车辆综合情况进行评价...");
message.error("请输入综合评分的综合评价");
return;
}
const routeData = this.$route.query || {};
const postData = {
...this.postData,
taskId: Number(routeData.id) || 0,
exteriorScore: this.normalizeIntegerScore(this.postData.exteriorScore),
overallScore: this.normalizeIntegerScore(this.postData.overallScore),
};
const modifiedFields = this.collectModifiedFieldNames();
DetectionController.inspectRecordSaveScore(this.axios, postData)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!