mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 13:21:08 +03:30
fix : try to fix vue part
This commit is contained in:
@@ -103,13 +103,16 @@ export default {
|
||||
}),
|
||||
methods: {
|
||||
async load(id) {
|
||||
const result = await axios.get(urls.showItem(id));
|
||||
|
||||
if (result.status == 200) {
|
||||
this.data = result.data.data;
|
||||
this.generateBarcode(this.data.id);
|
||||
this.MedicalCenter = this.data.user.medical_center.name;
|
||||
}
|
||||
try {
|
||||
const result = await axios.get(urls.showItem(id));
|
||||
if (result.status == 200) {
|
||||
this.data = result.data.data;
|
||||
this.generateBarcode(this.data.id);
|
||||
this.MedicalCenter = this.data.user.medical_center.name;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Error loading data:", error);
|
||||
}
|
||||
},
|
||||
|
||||
async generateBarcode(itemId) {
|
||||
@@ -160,10 +163,9 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.$route.params.item) {
|
||||
// console.log(this.$route.params.item);
|
||||
this.load(this.$route.params.item);
|
||||
}
|
||||
if (this.$route.params.Item) {
|
||||
this.load(this.$route.params.Item);
|
||||
}
|
||||
},
|
||||
// mounted() {
|
||||
// this.generateBarcode(this.data.id);
|
||||
|
||||
Reference in New Issue
Block a user