fix : try to fix vue part

This commit is contained in:
zeinab.ashrafi
2025-03-15 14:28:43 +03:30
parent 8a90d3bce4
commit abd611cdcf
5 changed files with 17 additions and 17237 deletions
-17224
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -3,7 +3,8 @@ const urls = {
return `/ShowTestResult/${id}`; return `/ShowTestResult/${id}`;
}, },
showItem: function(id) { showItem: function(id) {
return `/Items/${id}`; return `/ShowItem/${id}`;
}, },
showPackage: function(id) { showPackage: function(id) {
return `/ShowPackage/${id}`; return `/ShowPackage/${id}`;
+13 -11
View File
@@ -103,13 +103,16 @@ export default {
}), }),
methods: { methods: {
async load(id) { async load(id) {
const result = await axios.get(urls.showItem(id)); try {
const result = await axios.get(urls.showItem(id));
if (result.status == 200) { if (result.status == 200) {
this.data = result.data.data; this.data = result.data.data;
this.generateBarcode(this.data.id); this.generateBarcode(this.data.id);
this.MedicalCenter = this.data.user.medical_center.name; this.MedicalCenter = this.data.user.medical_center.name;
} }
} catch (error) {
console.error("Error loading data:", error);
}
}, },
async generateBarcode(itemId) { async generateBarcode(itemId) {
@@ -160,10 +163,9 @@ export default {
} }
}, },
created() { created() {
if (this.$route.params.item) { if (this.$route.params.Item) {
// console.log(this.$route.params.item); this.load(this.$route.params.Item);
this.load(this.$route.params.item); }
}
}, },
// mounted() { // mounted() {
// this.generateBarcode(this.data.id); // this.generateBarcode(this.data.id);
@@ -143,7 +143,7 @@
</template> </template>
</v-layout> </v-layout>
</v-layout> </v-layout>
<v-layout align-left justify-left wrap class="px-5 my-3"> <v-layout align-left justify-left wrap class="my-3">
<h3 class="ml-3 CSSD-font">Image</h3> <h3 class="ml-3 CSSD-font">Image</h3>
<v-flex xs12> <v-flex xs12>
<hr class="v-divider theme--light" /> <hr class="v-divider theme--light" />
+1
View File
@@ -117,6 +117,7 @@ export default [
view: 'TestResult/Show', view: 'TestResult/Show',
meta: { meta: {
public: true, public: true,
title:'Show Test Result | CSSD Dashboard'
}, },
}, },
{ {