refactor: assignFormData after ocr
This commit is contained in:
parent
8c4b31b06b
commit
24ea8f1164
1 changed files with 32 additions and 11 deletions
|
|
@ -2725,6 +2725,7 @@ const emptyCreateDialog = ref(false);
|
||||||
"
|
"
|
||||||
:delete-item="
|
:delete-item="
|
||||||
async (obj) => {
|
async (obj) => {
|
||||||
|
let status: boolean = false;
|
||||||
const res = await employeeStore.delMeta({
|
const res = await employeeStore.delMeta({
|
||||||
parentId: currentFromDataEmployee.id || '',
|
parentId: currentFromDataEmployee.id || '',
|
||||||
group: obj.group,
|
group: obj.group,
|
||||||
|
|
@ -2732,9 +2733,14 @@ const emptyCreateDialog = ref(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
return true;
|
status = true;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
|
await employeeFormStore.assignFormDataEmployee(
|
||||||
|
currentFromDataEmployee.id,
|
||||||
|
);
|
||||||
|
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
:save="
|
:save="
|
||||||
|
|
@ -2743,6 +2749,8 @@ const emptyCreateDialog = ref(false);
|
||||||
_meta: any,
|
_meta: any,
|
||||||
file: File | undefined,
|
file: File | undefined,
|
||||||
) => {
|
) => {
|
||||||
|
let status: boolean = false;
|
||||||
|
|
||||||
if (file !== undefined && currentFromDataEmployee.id) {
|
if (file !== undefined && currentFromDataEmployee.id) {
|
||||||
const res = await employeeStore.postMeta({
|
const res = await employeeStore.postMeta({
|
||||||
parentId: currentFromDataEmployee.id || '',
|
parentId: currentFromDataEmployee.id || '',
|
||||||
|
|
@ -2752,7 +2760,7 @@ const emptyCreateDialog = ref(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
return true;
|
status = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const {
|
const {
|
||||||
|
|
@ -2770,11 +2778,15 @@ const emptyCreateDialog = ref(false);
|
||||||
file,
|
file,
|
||||||
});
|
});
|
||||||
if (res) {
|
if (res) {
|
||||||
return true;
|
status = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
await employeeFormStore.assignFormDataEmployee(
|
||||||
|
currentFromDataEmployee.id,
|
||||||
|
);
|
||||||
|
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
:get-file-list="
|
:get-file-list="
|
||||||
|
|
@ -4144,6 +4156,7 @@ const emptyCreateDialog = ref(false);
|
||||||
"
|
"
|
||||||
:delete-item="
|
:delete-item="
|
||||||
async (obj) => {
|
async (obj) => {
|
||||||
|
let status: boolean = false;
|
||||||
const res = await employeeStore.delMeta({
|
const res = await employeeStore.delMeta({
|
||||||
parentId: currentFromDataEmployee.id || '',
|
parentId: currentFromDataEmployee.id || '',
|
||||||
group: obj.group,
|
group: obj.group,
|
||||||
|
|
@ -4151,9 +4164,14 @@ const emptyCreateDialog = ref(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
return true;
|
status = true;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
|
await employeeFormStore.assignFormDataEmployee(
|
||||||
|
currentFromDataEmployee.id,
|
||||||
|
);
|
||||||
|
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
:save="
|
:save="
|
||||||
|
|
@ -4162,6 +4180,7 @@ const emptyCreateDialog = ref(false);
|
||||||
_meta: any,
|
_meta: any,
|
||||||
file: File | undefined,
|
file: File | undefined,
|
||||||
) => {
|
) => {
|
||||||
|
let status: boolean = false;
|
||||||
if (file !== undefined && currentFromDataEmployee.id) {
|
if (file !== undefined && currentFromDataEmployee.id) {
|
||||||
const res = await employeeStore.postMeta({
|
const res = await employeeStore.postMeta({
|
||||||
parentId: currentFromDataEmployee.id || '',
|
parentId: currentFromDataEmployee.id || '',
|
||||||
|
|
@ -4171,7 +4190,7 @@ const emptyCreateDialog = ref(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
return true;
|
status = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const {
|
const {
|
||||||
|
|
@ -4189,11 +4208,13 @@ const emptyCreateDialog = ref(false);
|
||||||
file,
|
file,
|
||||||
});
|
});
|
||||||
if (res) {
|
if (res) {
|
||||||
return true;
|
status = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
await employeeFormStore.assignFormDataEmployee(
|
||||||
return false;
|
currentFromDataEmployee.id,
|
||||||
|
);
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
:get-file-list="
|
:get-file-list="
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue