edit repairs
This commit is contained in:
parent
c79d5bb1cd
commit
789272dc37
9 changed files with 201 additions and 74 deletions
|
@ -111,7 +111,7 @@ export default defineComponent({
|
|||
required: true,
|
||||
},
|
||||
},
|
||||
emits: ["update:model-value", "add:difference", "remove:difference", "add:damageReport", "add:damageReportByArray"],
|
||||
emits: ["update:model-value", "add:difference", "remove:difference", "add:damageReport"],
|
||||
watch: {
|
||||
modelValue() {
|
||||
// if (this.initialLoaded) return;
|
||||
|
@ -215,15 +215,18 @@ export default defineComponent({
|
|||
});
|
||||
},
|
||||
getDamageReportFromSearch(id: string) {
|
||||
return this.filtered.find((f) => f.id == id);
|
||||
return this.available.find((f) => f.id == id);
|
||||
},
|
||||
loadDamageReportsInitial() {
|
||||
if (this.modelValue.length == 0) return;
|
||||
this.getDamageReportsByIds(this.modelValue)
|
||||
.then((res) => {
|
||||
this.chosen = res.data;
|
||||
})
|
||||
.catch(() => {});
|
||||
if (this.modelValue.length == 0) {
|
||||
this.chosen = [];
|
||||
} else {
|
||||
this.getDamageReportsByIds(this.modelValue)
|
||||
.then((res) => {
|
||||
this.chosen = res.data;
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
@ -201,7 +201,7 @@ export default defineComponent({
|
|||
});
|
||||
},
|
||||
getDamageReportFromSearch(id: string) {
|
||||
return this.filtered.find((f) => f.id == id);
|
||||
return this.available.find((f) => f.id == id);
|
||||
},
|
||||
loadDamageReportInitial() {
|
||||
if (this.modelValue == "" || this.modelValue == null) return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue