|
@@ -10,7 +10,15 @@
|
|
|
|
|
|
<a-form ref="formRef" :label-col="{ style: { width: '90px' } }">
|
|
<a-form ref="formRef" :label-col="{ style: { width: '90px' } }">
|
|
<a-form-item label="识别结果">
|
|
<a-form-item label="识别结果">
|
|
- <span class="color-brand">{{ areaResult || "#" }}</span>
|
|
|
|
|
|
+ <a-input
|
|
|
|
+ v-if="editing"
|
|
|
|
+ v-model:value="paperType"
|
|
|
|
+ style="width: 100px"
|
|
|
|
+ />
|
|
|
|
+ <span v-else class="color-brand">{{ areaResult || "#" }}</span>
|
|
|
|
+ <qm-button class="ml-15px" @click="toggleEditing">{{
|
|
|
|
+ editing ? "取消" : "编辑"
|
|
|
|
+ }}</qm-button>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
<a-form-item label="识别图片">
|
|
<a-form-item label="识别图片">
|
|
<div class="paper-type-img">
|
|
<div class="paper-type-img">
|
|
@@ -51,6 +59,7 @@ defineOptions({
|
|
name: "ModifyPaperType",
|
|
name: "ModifyPaperType",
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+const editing = ref(false);
|
|
/* modal */
|
|
/* modal */
|
|
const { visible, open, close } = useModal();
|
|
const { visible, open, close } = useModal();
|
|
defineExpose({ open, close });
|
|
defineExpose({ open, close });
|
|
@@ -74,13 +83,23 @@ async function getConfig() {
|
|
function selectPaperType(val: string) {
|
|
function selectPaperType(val: string) {
|
|
paperType.value = val;
|
|
paperType.value = val;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+let oldPaperType: string = "";
|
|
|
|
+const toggleEditing = () => {
|
|
|
|
+ if (!editing.value) {
|
|
|
|
+ oldPaperType = paperType.value;
|
|
|
|
+ } else {
|
|
|
|
+ paperType.value = oldPaperType;
|
|
|
|
+ }
|
|
|
|
+ editing.value = !editing.value;
|
|
|
|
+};
|
|
function confirm() {
|
|
function confirm() {
|
|
if (!paperType.value) {
|
|
if (!paperType.value) {
|
|
message.error("请选择卷型");
|
|
message.error("请选择卷型");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
emit("confirm", paperType.value);
|
|
emit("confirm", paperType.value);
|
|
|
|
+ editing.value = false;
|
|
|
|
+ oldPaperType = "";
|
|
close();
|
|
close();
|
|
}
|
|
}
|
|
|
|
|